Page 1 of 1

Bots move in simulator but not in game

Posted: Fri Jul 10, 2009 4:43 pm
by Kender
I just uploaded my first bot "Nemesis".
It's still absolute rubbish but I wanted to see it play against some of the other bots.

Locally it works fine in both Native and "production" mode.
But to my surprise when I look at the games it plays on the site, nothing is happening!
One bot is built at my starting city and it just sits there, not moving, not building, nothing :(

What am I doing wrong?

Posted: Wed Jul 15, 2009 5:49 am
by adum
99% of the time this means you built with Java 5 or later. are you SURE you tested locally with the HackJVM?

Posted: Wed Jul 15, 2009 8:08 am
by Kender
Hey Adum,

My compile target is set to 1.5 in eclipse. Setting it to 1.6 makes the bot fail locally.

My Nemesis bot runs fine in the local simulator (RunSimulator.bat) both with and without the "Run natively" checkbox.

Are you SURE the HackJVM used by the match runner is the same as the one in the BithBathSDK v389?

Does the nemesis.class file I uploaded work for you locally in the simulator?


Perhaps it doesn't like that I've defined two classes in one java file, but then why does it work in the simulator but not in the real game?

Code: Select all

import java.util.Random;

final class City {
	public int X, Y, Side;

	public City(int x, int y, int side) {
		this.X = x;
		this.Y = y;
		this.Side = side;
	}
}

public class Nemesis {
	public int orderType = 0;
	public double destX, destY; 
...
Meanwhile I've been working on a new bot but I'm a bit loathe to upload it without knowing if it will move.
So any help in clarifying this issue will be very welcome!

[edit]
I've decided to go ahead and uploaded my new bot: Sun Tzu. Hope it works.
I'm looking forward to seeing my newborn creation in action against others.
I also hope the horrible rating caused by my defective first bot will improve ;)