[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - cmd line for competing bots

It is currently Fri Jun 22, 2018 1:14 pm Advanced search

cmd line for competing bots

Code won't compile? Found a bug? Post here!

cmd line for competing bots

Postby SilverBullet » Mon Nov 22, 2010 2:59 am

java -jar tools/PlayGame.jar maps/map7.txt 1000 1000 log.txt "java MyBot" "java MyBot" | java -jar tools/ShowGame.jar

When I enter this into a cmd line Both bots time out?

I'm sure this has a very easy solution, however no1 else on this forum seems to be inept enough to encounter the same problem :D

Any help is appreciated
SilverBullet
Cadet
 
Posts: 5
Joined: Mon Nov 22, 2010 2:36 am

Re: cmd line for competing bots

Postby dimkadimon » Mon Nov 22, 2010 3:04 am

There must be a bug in MyBot.java. Either it is thinking too long (1 second limit) or it is making an illegal move such as sending more ships than possible.
dimkadimon
Major-General
 
Posts: 263
Joined: Wed Oct 06, 2010 11:34 pm
Location: Adelaide, Australia

Re: cmd line for competing bots

Postby SilverBullet » Mon Nov 22, 2010 3:06 am

Sorry I should have added:

I just started and the bot is still the original MyBot.java file. I uploaded the zip file to the site as is, just to make sure everything is working correctly, and it appears to be playing games as expected. (Although it is not very good :P )

Still though, I'm unable to play my bot against the pre-made bots
SilverBullet
Cadet
 
Posts: 5
Joined: Mon Nov 22, 2010 2:36 am

Re: cmd line for competing bots

Postby glevee » Mon Nov 22, 2010 5:39 am

glevee
Colonel
 
Posts: 68
Joined: Tue Sep 28, 2010 1:11 am

Re: cmd line for competing bots

Postby SilverBullet » Mon Nov 22, 2010 10:16 am

Thank you for the in-depth reply. I was under the impression that the FinishTurn output "go". Where is the text being sent, just system.out? or do I return the new Planet Wars object with the message including all of my actions plus "go"?
SilverBullet
Cadet
 
Posts: 5
Joined: Mon Nov 22, 2010 2:36 am

Re: cmd line for competing bots

Postby glevee » Mon Nov 22, 2010 6:00 pm

(all functions listed are from the start_package, you are free to modify, rewrite, eliminate, etc)

You receive "state and go" on stdin (in main) and send "moves and go" on stdout (the IssueOrder & FinishTurn methods in the PlanetWars class).
glevee
Colonel
 
Posts: 68
Joined: Tue Sep 28, 2010 1:11 am

Re: cmd line for competing bots

Postby SilverBullet » Tue Nov 23, 2010 2:07 am

This is very frustrating, I'm not sure what else to do. Uploading the bot to the site and waiting 30 minutes between games is hardly a feasible way to test the bot and make improvements. Does anyone know why this bot will work on the site, but not run via the cmd prompt? Still in need of help
SilverBullet
Cadet
 
Posts: 5
Joined: Mon Nov 22, 2010 2:36 am

Re: cmd line for competing bots

Postby spz » Tue Nov 23, 2010 2:52 am

SilverBullet, could you provide more details? I'm assuming you're just starting out, maybe post a zip file of all your files?

Have you completed ?

For all we know, you're not even doing the "javac *.java" step, but we cannot help without more information.
spz
Captain
 
Posts: 24
Joined: Fri Sep 24, 2010 1:58 am

Re: cmd line for competing bots

Postby SilverBullet » Tue Nov 23, 2010 2:59 am

SilverBullet
Cadet
 
Posts: 5
Joined: Mon Nov 22, 2010 2:36 am

Re: cmd line for competing bots

Postby smiley1983 » Tue Nov 23, 2010 3:49 am

Is it possible you need "java -jar MyBot.jar" or similar instead of "java MyBot"?
I don't use Java so my suggestion may be of no help, I've just noticed that adding the "-jar" sometimes makes Java things work. :)
smiley1983
Colonel
 
Posts: 54
Joined: Tue Oct 05, 2010 6:28 pm

Next

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron