View source for User talk:Tmservo

From Robowiki
Jump to navigation Jump to search
package Josewong;
import robocode.*;
//import java.awt.Color;

// API help : http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html

/**
 * Invertigo - a robot by (your name here)
 */
public class Invertigo extends Robot
{
	/**
	 * run: Invertigo's default behavior
	 */
	public void run() {
		// Initialization of the robot should be put here

		// After trying out your robot, try uncommenting the import at the top,
		// and the next line:

		// setColors(Color.red,Color.blue,Color.green); // body,gun,radar

		// Robot main loop
		while(true) {
			// Replace the next 4 lines with any behavior you would like
			back(100);
			turnGunLeft(360);
			ahead(100);
			turnGunLeft(360);
		}
	}

	/**
	 * onScannedRobot: What to do when you see another robot
	 */
	public void onScannedRobot(ScannedRobotEvent e) {
		// Replace the next line with any behavior you would like
		fire(0.95);
	}

	/**
	 * onHitByBullet: What to do when you're hit by a bullet
	 */
	public void onHitByBullet(HitByBulletEvent e) {
		// Replace the next line with any behavior you would like
		ahead(10);
	}
	
	/**
	 * onHitWall: What to do when you hit a wall
	 */
	public void onHitWall(HitWallEvent e) {
		// Replace the next line with any behavior you would like
		ahead(20);
	}	
}
package Josewong;
import robocode.*;

// API help : http://robocode.sourceforge.net/docs/robocode/robocode/JuniorRobot.html

/**
 * InvertigoJunior - a robot by (your name here)
 */
public class InvertigoJunior extends JuniorRobot
{
	/**
	 * run: InvertigoJunior's default behavior
	 */
	public void run() {
		// Initialization of the robot should be put here

		// Some color codes: blue, yellow, black, white, red, pink, brown, grey, orange...
		// Sets these colors (robot parts): body, gun, radar, bullet, scan_arc
		setColors(orange, blue, white, yellow, black);

		// Robot main loop
		while(true) {
			// Replace the next 4 lines with any behavior you would like
			back(100);
			turnGunLeft(360);
			ahead(100);
			turnGunLeft(360);
		}
	}

	/**
	 * onScannedRobot: What to do when you see another robot
	 */
	public void onScannedRobot() {
		// Replace the next line with any behavior you would like
		fire(0.95);
	}

	/**
	 * onHitByBullet: What to do when you're hit by a bullet
	 */
	public void onHitByBullet() {
		// Replace the next line with any behavior you would like
		ahead(10);
	}
	
	/**
	 * onHitWall: What to do when you hit a wall
	 */
	public void onHitWall() {
		// Replace the next line with any behavior you would like
		ahead(20);
	}	
}

I am actually Josewong from wikia My name is Augustus Joseph Wong and my location is 7129 Beverly Street, 66204,

Contents

Thread titleRepliesLast modified
Skilgannon's kd-tree3020:43, 11 October 2013
First page
First page
Next page
Next page
Last page
Last page

Skilgannon's kd-tree

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

 

Return to Thread:User talk:Tmservo/Julian Kent's kd-tree.

They're pretty much tied. Mine might be a little faster on systems where the data in the Kd-Tree is frequently pushed out of cache.

Skilgannon (talk)13:28, 4 October 2013

is third generation Rednaxela faster than Julian Kent

Tmservo (talk)13:38, 4 October 2013

No, as I said above, they are mostly the same except for cache conditions.

Skilgannon (talk)15:07, 4 October 2013

what about second generation Rednaxela and first generation Rednaxela

Tmservo (talk)23:22, 4 October 2013

3rd gen is the fastest of Rednaxela's trees. There's also a k-NN algorithm benchmark if you want to run some tests.

Voidious (talk)02:32, 5 October 2013
 
 
 
 
 
First page
First page
Next page
Next page
Last page
Last page