[Home]HaikuChicken

Robo Home | Changes | Preferences | AllPages

The only HaikuBot I know of that dodges bullets! Probably, in all fairness, the hardest HaikuBot to hit that actually fires back. Based on FunkyChicken 1.0's movement.

package kawigi.haiku;
import robocode.*;

public class HaikuChicken extends AdvancedRobot
{
	/**
	 * HaikuChicken - a Haiku perceptual bullet-dodger that could beat NanoSatan Kappa and Kakuru 1.20 some of the time.
	 */
	public void run()
	{
		turnGunRight(Double.POSITIVE_INFINITY);
	}
	
	public void onScannedRobot(ScannedRobotEvent e)
	{
		setTurnRight((e.getBearing() - 90)%180);
		setAhead(Math.tan(e.getEnergy()*5)*1000);
		setFire(Math.min(3, e.getEnergy()/4));
	}
}

Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited August 6, 2003 23:17 EST by Kawigi (diff)
Search: