*Disclaimer: This blog entry is not too be taken too seriously.That's right, I'm talking trash already. After all the practice assignments, it's time for our Robocode tournament. My mighty Menehune bot is taking home the gold.
Let's go over the strategies:
So to take down the sample robots, my robot has two movement strategies based on whether or not the enemy is stationary. If the enemy is stationary, Menehune moves up and down (similar to walls) and fires when it sees the robot. If the enemy is too close, Menehune moves away before going into the vertical pattern.
If the enemy is moving, Menehune is going to follow it. Movement is similar to the Tracker robot.
If we hit another enemy, Menehune assumes the robot is not stationary (it would've moved away from it initially). Menehune moves away a bit before tracking it again.
Targeting is straightforward. If the enemy is stationary, Menehune just points the radar left or right (depending on where the enemy is). If the robot is moving, Menehune applies Tracker's method of turning the gun and pointing the radar at the enemy.
There's a counter built in that tracks how long its been since Menehune last saw the enemy. If Menehune hasn't seen the enemy in a while, Menehune will stop to reacquire it.
If the enemy is stationary, Menehune can fire a full power bullet without fear of it missing. Otherwise, Menehune gets close before firing the bullet. Menehune shoots a weaker bullet if the enemy is a bit far away. Also, if the enemy hits Menehune, it retaliates by shooting back before moving away.
Of course, the strategies look good on paper, but how do they fare against the team in the sample package?
Menehune tracks Corners as it tries to move into a corner of the map. Once Corners stops moving, Menehune just moves up and down and shoots a full power bullet.
Menehune does get caught in situations where it moves directly above the corner robot. Not as clear cut of a winner, but it still wins more often than not.
Crazy obviously moves a lot. Menehune does its best to track down. More often than not though, Crazy gets a little dizzy and gets disabled, making it easy to pick off.
Because Fire doesn't move at all, it's easy to kill using the stationary robot strategy. No contest.
The first real test. Unfortunately, Menehune just can't get away from RamFire. We still win from time to time, but RamFire kills more often than not.
SpinBot's movement makes it really difficult to follow and track. Menehune does its best, but it always bumps into SpinBot. SpinBot always fires at full blast too, making it deal a lot of damage as Menehune gets in. Sometimes the matches are pretty even, but SpinBot does have an edge.
Menehune uses a lot of Tracker code, so one would think that it'd be pretty even. Unfortunately, Tracker registers as a stationary bot for a little while and gets in a few shots before we start tracking it down. Menehune doesn't put up much of a fight.
Walls just dominates Menehune. The tracking just can't keep up with Walls' movement. In essence, Menehune moves to a spot where Walls had long since passed.
Overall: 4-3 Sample bots (didn't count SittingDuck, cause that's a freebie).
By now, you probably realize that all of the intro stuff was just talk and that there's nothing fancy going on here. Tracking an enemy using the base Robot class is extremely difficult. Given a version 2.0, maybe we can use the AdvancedRobot class to move around the field better. Comments in the Tracker code allude to this as well. It'll be interesting to see how it fares in the class tournament. Let's see what you got!
Download my bot here.