Difference between revisions of "Talk:LittleBlackBook"
Jump to navigation
Jump to search
m (Another point) |
|||
Line 4: | Line 4: | ||
: Math.signum() off e.velocity screws up 0 velocity checks and I have no velocity averaging. I'll check other bots for inspiration though. Has to be TINY though | : Math.signum() off e.velocity screws up 0 velocity checks and I have no velocity averaging. I'll check other bots for inspiration though. Has to be TINY though | ||
: What about... <code>static double foo = 1; foo = e.velocity + 0.01*foo; foo /= foo;</code>? Not sure if that would be small enough, and I haven't checked it's codesize, but I think it's smaller than any others ways to handle that which come to my mind. I think it's smaller than <code>static double foo = 1; foo = (e.velocity == 0) ? foo : Math.signum(e.velocity);</code> anyway, since conditionals and function calls are expensive if I remember right. I'd also suggest seeing if you can get rid of the need to normalize the value to 1/-1 all together, but that may not be possible in this case. --[[User:Rednaxela|Rednaxela]] 04:15, 15 June 2009 (UTC) | : What about... <code>static double foo = 1; foo = e.velocity + 0.01*foo; foo /= foo;</code>? Not sure if that would be small enough, and I haven't checked it's codesize, but I think it's smaller than any others ways to handle that which come to my mind. I think it's smaller than <code>static double foo = 1; foo = (e.velocity == 0) ? foo : Math.signum(e.velocity);</code> anyway, since conditionals and function calls are expensive if I remember right. I'd also suggest seeing if you can get rid of the need to normalize the value to 1/-1 all together, but that may not be possible in this case. --[[User:Rednaxela|Rednaxela]] 04:15, 15 June 2009 (UTC) | ||
+ | |||
+ | Hi! Awesome results! Now that I looked at the code, I think there is one little problem with the overall concept: every time a new robot or a new version of a robot appears, you have to update the stats in your bot. --[[User:Robar|HUNRobar]] 10:31, 15 June 2009 (UTC) |
Revision as of 11:31, 15 June 2009
Congrats!
Congrats! It's nice to see some movement in the nano scene lately. I was pondering predefined data bots myself actually. I'm curious though, you say "Any perfect dodge stop and go will kill it", which seems odd to me. It should be quite trivial for a distance/lateral segmented GF gun to hit that I'd think... --Rednaxela 01:51, 15 June 2009 (UTC)
- Math.signum() off e.velocity screws up 0 velocity checks and I have no velocity averaging. I'll check other bots for inspiration though. Has to be TINY though
- What about...
static double foo = 1; foo = e.velocity + 0.01*foo; foo /= foo;
? Not sure if that would be small enough, and I haven't checked it's codesize, but I think it's smaller than any others ways to handle that which come to my mind. I think it's smaller thanstatic double foo = 1; foo = (e.velocity == 0) ? foo : Math.signum(e.velocity);
anyway, since conditionals and function calls are expensive if I remember right. I'd also suggest seeing if you can get rid of the need to normalize the value to 1/-1 all together, but that may not be possible in this case. --Rednaxela 04:15, 15 June 2009 (UTC)
Hi! Awesome results! Now that I looked at the code, I think there is one little problem with the overall concept: every time a new robot or a new version of a robot appears, you have to update the stats in your bot. --HUNRobar 10:31, 15 June 2009 (UTC)