[Home]PhoenixFemto

Robo Home | Changes | Preferences | AllPages

Difference (from prior major revision) (no other diffs)

Added: 82a83,84

Ah, well, that's your problem for sending it to my hotmail account that only semi-exists for use in MSN messenger. Use kawigi@yajags.com (or robocode@yajags.com for RobocodeLittleLeague stuff). -- Kawigi

 #1 in Femto 1-v-1!

A FemtoBot by David Alves

1davidalves.net.PhoenixFemto 1.0 (80 bytes)3231110022016802310022180
2kawigi.FunkyFemto 1.0 (196 bytes)2891900 18016121980019220

Score / codesize gives:
1PhoenixFemto 1.040.3875
2FunkyFemto 1.014.75

1davidalves.net.PhoenixFemto 1.0 (80 bytes)5734 1700 340 3119 567 7 0 34 6 0
2arthord.Spinny 1.0 (34 bytes)907 300 60 506 22 19 0 6 34 0

Score / codesize gives:
1PhoenixFemto 1.0 71.675
2Spinny 1.025.914

Source code for version 1.0:

 public class PhoenixFemto extends AdvancedRobot {
	 
 	public void run(){
 		//Needed to keep the radar locked
 		setAdjustGunForRobotTurn(true);
		
 		do{
  			//We don't bother with aim, just point the gun (and radar) straight at the enemy.
 			turnGunRightRadians(Double.POSITIVE_INFINITY);
 		}while(true);
 	}
	
 	public void onScannedRobot(ScannedRobotEvent e){

  		//Duelist radar		
 		setTurnGunRightRadians(Math.sin(e.getBearingRadians() + getHeadingRadians() - getGunHeadingRadians()));

		//Stay exactly perpendicular. setTurnRight(e.getBearing() + 90 - getVelocity()) costs too much and doesn't raise our score much
 		setTurnRight(e.getBearing() + 90);

		//This will always be between +1000 and +infinity or between -1000 and -infinity
 		setAhead(1000/Math.sin(e.getEnergy()/2));

		//End our turn with a bang!
 		fire(3);
 	}
 }

this is funny, I mailed this source yesterday to Kawigi:

public class FemtoPower extends AdvancedRobot
{
	public void run() {
		setTurnGunRight(Double.POSITIVE_INFINITY);
	}
	
	public void onScannedRobot(ScannedRobotEvent e) {
		setTurnGunLeft(getGunTurnRemaining());
		setTurnLeftRadians(Math.tan(e.getBearingRadians()));
		setAhead(Math.tan(e.getEnergy()*5)*500);
		setFire(3);
	}
}

they are really similar, it also uses your DuelistNano-gun. but FemtoPower? has only 57 bytes. -- rozu

Yes, turn-gun-left! Stupid me. My excuse is that I copied Poets's gun from a bot where size doesn't matter. =) -- PEZ

I considered using the DuelistNano gun, but I thought that aiming directly at the target would gain enough points to be worth the cost in bytes. We'll see if I was right. :-P --David Alves

Hey, Rozu - I didn't get that from you. It occurs to me, though, that it has some striking similarities to HaikuChicken, too.

David - great job winning the first femto 1-on-1 tournament :-) -- Kawigi

Thanks! :-D --David Alves

oh bad, I sent it to kawigi@hotmail.com. No problem if you didn't get it, as David Alves has created nearly the same bot. -- rozu

Ah, well, that's your problem for sending it to my hotmail account that only semi-exists for use in MSN messenger. Use kawigi@yajags.com (or robocode@yajags.com for RobocodeLittleLeague stuff). -- Kawigi


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited September 14, 2003 20:14 EST by Kawigi (diff)
Search: