CRobots Programs

This directory contains various programs I have written for the game CRobots. Some of them are intentionally cannon-fodder; other are actually quite deadly. As is expected, many of them work well only against certain other robots, or in certain situations.

More information about the various robots mentioned here, incuding the four original robots (rabbit.r rook.r, counter.r, and sniper.r), can be found in Neil Fraser's Library of CROBOTS.

test.r
The ultimate sitting duck. Does nothing. Cannot win, except if all its opponents kill each other simultaneously.
bang.r
Fires 100 units to the right of where it starts. Does not move. Does little better than the above.
zap.r
This was a fairly early attempt at a complex robot. It is essentially an improvement on counter.r, with a better targetting scanner. It is able to track moving targets very easily, frequently following them correctly even when other robots cros the scanning region, but cannot accuratly hit them in transit; only when they stop will it start connecting. However, it is able to follow them very well; it will almost never loose its quarry once it has a good lock. If hit, it will, like counter, pick up and move to a different location, but will not fire en-route. This robot is easily able to beat any of the original demonstration robots, alone or in combination.
nest.r
The strategy taken in the design of this robot was to write a targetting routine so fast that the robot could easily survive without having to move, simply because it would kill its opponents before they could get a shot in. It performs quite well against any robot which does not shoot while it moves, and performs adequately against most other robots. In particular, its simple scanner was frequently able to locate and destroy a target before zap.r had even found a target (let alone acheived a lock on it). The only robots which it does not work well against are robots which never stop, and which lead their shots.
rover.r
This robot is a essentially the same as the last, but with a simple drive controller added. Instead of sitting still, this robot will move towards any robot which it acheives a good lock on. This serves two purposes: it allows the robot to attack stationary targets which would otherwise be out of range, and it makes itself slightly harder for any 3rd party robots to hit. (The robot under attack can still track rover fairly easily, as only the range changes, not the angle. Equivalently, however, rover can easily track the target it is attacking, for the same reason.)
quack.r
Inspired by rambo.r, this robot is a fairly tighly-written shot-leading robot. It uses a simple but efficient three-tiered divide-and-conquer scanner, which seems to run quite a bit faster than rambo's, and its drive mechanism is simpler, spending less time worrying about crashing into the walls. It is able to defeat rambo about 95% of the time in one-on-one matches, and can hold its own in multi-robot matches, though performance does tend to degrade due to tracking errors; with more than one target, the tracking mechanism can get confused, and end up firing at empty space. Like all robots listed here, however, it is sadly outclassed by rambo2.r.
runner.r
This robot was written in an attempt to defeat robots which lead their shots. It moves very quickly in tight equilateral triangle (near the middle of the screen), and will only deviate from this course if it has drifted too close to the right edge of the screen, in which case it will re-centre itself. By moving in such a tight pattern, it attempts to out-manoever shot-leading robots, which will frequently fire at a position well outside the triangle, runner having already turned onto the next leg of the triangle. By the time the shot-leader's tracking mechanism has caught up, runner will be making another turn. While running the legs of the triangle, runner scans perpendicularly to its direction of motion, and will fire if it finds a target. No shot-leading is implemented. This robot will win quite frequently in one-on-one matches with shot-leading robots such as quack.r or Neil Fraser's rambo.r, and will virtually always be the sole survivor of multiple-robot matches with such 'bots.
coward.r
This robot was an experiment witten during the creation of the above. It simply runs around in a fairly tight circle, in an attempt to out-manoever a shot-leading robot's scanner. It was not especially successful; an equilateral triangle was found to be more effective.

I have made the raw results from various matches played between different robots available. These are not very interesting, but were extremely useful when fine-tuning some of the above robots. (For example, quack.r's performance improves markedly as the various constants which control its shot-leading are adjusted.)


Christopher Allen (cpcallen@undergrad.math.uwaterloo.ca)