[Home]HaikuSillyBot

Robo Home | Changes | Preferences | AllPages

The original SillyBot was designed to beat MogBot. This version still can beat MogBot sometimes in shorter battles ( < 50 rounds). I lost the wall avoidance here, and I don't have the old SillyBot squiggly movement. I tried to put it in, but I'd need to spin the radar instead of the gun to get that back, unfortunately, or else I turn back and forth too much. It only happened before because of a bug anyways, but it probably made it appear to be better movement.
package kawigi.haiku;
import robocode.*;

/**
 * HaikuSillyBot - a haiku complex oscillator by Kawigi based on SillyBot.  Still occasionally beats MogBot.
 */
public class HaikuSillyBot extends AdvancedRobot
{
	public void run()
	{
		turnGunRight(Double.POSITIVE_INFINITY);
	}
	
	public void onScannedRobot(ScannedRobotEvent e)
	{
		setTurnRightRadians(robocode.util.Utils.normalRelativeAngle(Math.PI/2+e.getBearingRadians()));
		setAhead((Math.sin(getTime()/13.0)-Math.cos(getTime()/17.0))*400);
		setFire(e.getEnergy()/4);
	}
}

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