[Home]Carruthers/RRGC

Robo Home | Carruthers | Changes | Preferences | AllPages

Difference (from prior major revision) (minor diff)

Added: 37a38



Added: 38a40,43

* Jan 17 2007 - CarruthersRRGC? 1.2: 1763.58 (8.08 points above Carruthers 1.2.4)
** eh. Targeting needs improvements. Original movement is 8 points away from Raiko's standard. Probabily a bug in the long-time-no-touch Ocean system, a wrong choice of VGs, a bug in TargetingArray?, wrong technique of using output of the TA, or a combo of the above (yucks). Looks like time for a rewrite! At least now I know where I stand. =) --Nfwu
*** Comparision URL: http://rumble.fervir.com/rumble/RatingDetailsComparison?game=roborumble&name1=techdude.Carruthers%201.2&name2=wiki.rrgc.CarruthersRRGC%201.2

Carruthers 1.2's VirtualGun? array on top of Raiko, with added PowerManagement?.

Download: http://www.robocoderepository.com/BotDetail.jsp?id=3136

Source: (Depencancy's source also included in package)

package wiki.rrgc;
import robocode.*;
import techdude.core.*;
import java.util.*;
import java.awt.Color;
public class CarruthersRRGC extends techdude.Carruthers {
	static wiki.rmove.RaikoNMT movementRakio;
	public void initCore(){ //Override initCore for initilization of RaikoMove
		if (getRoundNum()==0){movementRakio=new wiki.rmove.RaikoNMT(this);}
		super.initCore();
	}
	public void doStuff(){ //Override doStuff to not do blackboard movement, and added basic power management.
		//moveUsing(motor.doMove(me, enemy, getMovementState()));
		if (getGunHeat()/getGunCoolingRate() < 3){
			setTurnGunRightRadians(Joel.normalizeRelativeAngle(me.guns.targetGun(me, enemy) - getGunHeadingRadians()));
		} else {
			setTurnGunRightRadians(Joel.normalizeRelativeAngle(me.tracker.absoluteAngleTo(enemy.tracker) - getGunHeadingRadians()));
		}
		me.guns.BULLET_POWER = Math.min(Math.max(0.0, (getEnergy()-10.0)*4.0/90.0), 3.0);
		//Fire Bullet
		if (radarmode == 1 /*&& opt_shootgun*/ && setFireBullet(me.guns.BULLET_POWER) != null) {
			//java.awt.Color $1, techdude.core.Joel$Point $2, long $3, float $4, techdude.core.RobotData $5, techdude.core.RobotData $6, java.util.Vector $7
			me.waves.registerWave(new Ocean.Record(Color.GREEN, me.prevLoc, getTime()-1, (float)Joel.bulletVelocity(me.guns.BULLET_POWER), enemy, me, new Vector()), true);
		}
		doRadar();
	}
	//Override onScannedRobot to pass parameters to RaikoMove
	public void onScannedRobot(ScannedRobotEvent e) {
		super.onScannedRobot(e);
		movementRakio.onScannedRobot(e);
	}
}

Results:


Robo Home | Carruthers | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited January 17, 2007 2:34 EST by Nfwu (diff)
Search: