Objective
Robocode in a short period of time swept the world, the world's Robocode enthusiasts designed a large number of excellent intelligent robots, they have their own way of movement, and some are easily hit, some are difficult to shoot. To design a good sport mode is the key to win the excellent Robocode robot. The last World Intermediate group champion, Fermat, was a victory for his elusive movement by the enemy's bullet. (Of course, his excellent aim shooting is also the key to win) what kind of movement can not be hit by the enemy, let the enemy elusive? Here I put the common robot movement way into 4 categories to explain.
Active movement with obvious regularity
Just start playing Robocode many will have this feeling, the samples inside walls strongest, no one can hit him. Wall is a typical apparently regular active movement, he always goes straight around the wall, as shown in Figure 1:
Figure 1
Because it's almost always moving, and sample inside the robot shooting method is almost directly to shoot the enemy's current position, because the bullets to reach the target needs a certain time, when the bullets fly past, wall is not in the original position, so they always can't hit it, so in the beginning it It seems so powerful. However, walls is not a good robot, it is only as an example to introduce the production of Robocode robot, a bit more powerful robot can be very handy to shoot it, and some robots can even gun gun must hit it. Most of them used the algorithm in advance to calculate the distance that the bullet walls about when it arrived at walls, and then attacked the place where walls would walk next. As for how to encode the implementation, has been beyond the scope of this article, you can refer to predictive targeting.
A lot of robots take this kind of movement, they are very obvious, it is easy to grasp, like spinbot always do circular motion (circular motion shooting method can see the circumference of the target), corners always hide in the corner ... You will find that they are very easy to deal with the role, is not to write a good robot can not use such a strategy? Of course not, the robot may not think it is regular (depending on your robot's analytical method) when it appears to be in regular motion. Especially in a group war, you have to take into account a large number of enemies, you can not only focus on an enemy's movement, you have to pay attention to a or focus on B's movement, so even if a is a regular and obvious movement, you are very difficult to detect.
The typical example is David McCoy's Prairiewolf, you see it often in the corner to do a movement around the corner, but you may not be able to shoot him easily, there is Paul Evans's sandboxlump, it is not only in the corner back and forth, And there's a lot of arc movement, like Figure 2:
Figure 2