Code center > Suggestions
Camoflage
EricL:
--- Quote from: Peter ---Okay, so the % chance a bot sees another will be
(.camo/.body)<--other bot:bot using camo(ratio camo/body) exact formula I don't know.
-------------
.eye5<------------your own.
--- End quote ---
This is incorrect. It is .camo/radius NOT .camo/.body and the same calculation is done for all eyes, not just .eye5.
Numsgil:
I have no problems with this, I'm planing on doing something similar with DB3 (increase vision radius to infinity and just limit sight based on apparent size, with camouflage (you spelled it wrong in the title btw) modifying this...)
For the present, I think speed needs to be incorporated in to it. Real life camouflage is about looking like a rock or leaf-- that is, things that don't move, or move really slowly. A cheetah running at 60 mph does NOT look like shadows interplaying on leaves. It looks like a big hungry predator. This would also encourage some smarter strategies for hunting. You could just camouflage yourself real well and sit and wait in one place until something comes by, then leap out and kill it before it can react.
EricL:
--- Quote from: Numsgil ---camouflage (you spelled it wrong in the title btw) modifying this...)
--- End quote ---
speling has never been one of my strong points. Autocorrect has ruined me. My fingers go the wrong places now.
--- Quote from: Numsgil ---For the present, I think speed needs to be incorporated in to it. Real life camouflage is about looking like a rock or leaf-- that is, things that don't move, or move really slowly. A cheetah running at 60 mph does NOT look like shadows interplaying on leaves. It looks like a big hungry predator. This would also encourage some smarter strategies for hunting. You could just camouflage yourself real well and sit and wait in one place until something comes by, then leap out and kill it before it can react.
--- End quote ---
A most excellent suggestion. How about if I subtract |velocity| * X from the effective .camo value and defeat camo completely when |velocity| exceds 25% of maxvel?. Suggestions for X welcome. I'm thinking maybe 20?
Also, I need a degredation rate. Slime degrades 2% per cycle. I'll make .camo the same barring better ideas.
Numsgil:
I'm not a fan of linear relationships (as the bunches of weird atan formulas in the shot code probably told you ). My new favorite kernel is 6t^5 - 15t^4 + 10t^3 where t is in [0,1] and gives results in [0,1] (makes it easy to scale the domain and range) because it's easy to calculate and has 0 first and second derivatives at its end points. (Off topic: you might want to replace those weird atan formulas with this kernel since it's easier to visualize and graph).
Using a formula like this, moving slowly and not moving would be comparable in effectiveness, but then the loss in camo ramps up real fast. Once you get near maxvel, the effectiveness bottoms out and changes very slowly from 95% maxvel and 100% maxvel.
EricL:
I like it having a non-linear relationship w.r.t. velocity. Seems like a lot of exponentials to compute for something like this, but I'll make it work. I'll use a look up table or something.
EDIT: Also I wonder whether we want to scale it up to maxvel or only up to 0.25maxvel or similar. Seems to me that at some speed, there's just no hiding and I can shortcut the computation that way.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version