Robo Home | Changes | Preferences | AllPages

When you detect that the enemy fires, set up a few VirtualBullets going from the enemy to probable targetting points. Then see to it that you avoid those possible bullets in your movement.

Neptune and Pluto set up shrapnel to the dead aim and the linear aim, plus one of its own previous movements. Actually, VirtualBullets going a bit ahead of the real bullet because it takes a bit of time to get out of the way. The MiniBot Charon? also uses this.


TheArtOfWar's bullet dodging is very similar. It plots 3 enemy bullet lines: one fired straight at its current position, one fired based on its average speed and heading, and one fired using an iterative aiming technique similar to its own. When the bullets are close (within "X" ticks to impact, if I remember correctly), then it plots the shortest line to the bullet's trajectory, and assigns an anti-gravity point to the intersection of those lines. This accomplishes two things: 1) TheArtOfWar doesn't dodge bullets until they are close enough to pose a threat; 2) It causes it to dodge left and right (good!) instead of back and forth (not good!).

Once you get the bugs out, it works well, but it makes for very predictable movement. :-( -- Ray Vermette

 very predictable movement != works well... --David Alves 

You are squandering your considerable math skills here David. You should be using them to defeat SandboxDT instead. ;-) -- rv.

I am new to Robocode, and relatively new(pun not intended) to Java and OOP. I used this kind of system in my first bot. It took me an hour or so to get the kinks out, but it runs randomly(or as close as possible, using math.random) and can last a while against more professional bots, like SandboxDT. ;) (this is without my bot firing a single bullet!)

I used it VERY simply, so my bot cycles through an array in the main loop, and checks if the variable in the array node it's at(each node is = to one tick) is true, which means a bullet is going to hit in a few ticks. My bot then randomly decides to move left or right(moving away from a wall if it hit it the move before) So, it does not even determine where the bullet might be, it just gets the heck away from where it is :)

If I did something wrong with using the wiki, feel free to either correct my mistake or yell at me :) --Jray

Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited July 23, 2005 2:16 EST by Jray (diff)