[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/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 - Having problems with PlayGame.jar or ShowGame.jar?

It is currently Mon Oct 23, 2017 6:47 pm Advanced search

Having problems with PlayGame.jar or ShowGame.jar?

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

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby olgeorge » Sat Oct 23, 2010 10:21 am

Hi guys!

I wonder if you can help me.

I run ShowGame in the following way:

java -jar tools/PlayGame.jar maps/map7.txt 1000 1000 log.txt "java -jar example_bots/RandomBot.jar" "java -jar example_bots/DualBot.jar" | java -jar tools/ShowGame.jar

The output us following:
WARNING: player 1 timed out.
WARNING: player 2 timed out.
Turn 1
Draw!

Then the vizualizer starts, displays a bunch of neutral planets and nothing happens.

So, why are the bots timed out? It's hard for me to deal with it since I'm not familiar with all the java stuff

Thanks!
olgeorge
Cadet
 
Posts: 2
Joined: Sat Oct 23, 2010 10:13 am

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby olgeorge » Sat Oct 23, 2010 10:50 am

Wow, PlayGame-1.2.jar does it just fine!

Sorry(=
olgeorge
Cadet
 
Posts: 2
Joined: Sat Oct 23, 2010 10:13 am

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby 71_FIL » Wed Oct 27, 2010 2:48 am

I think I've gone through this thread thoroughly but I'm still having a problem. Was happening on Mac OS X (Snow Leopard) and happening too on Centos. Must be something I'm doing wrong.

> java -jar tools/ShowGame-1.2.jar < log.txt
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 1
at ViewerPanel.run(ViewerPanel.java:85)
at java.lang.Thread.run(Unknown Source)
71_FIL
Cadet
 
Posts: 2
Joined: Tue Oct 26, 2010 2:30 am

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby 71_FIL » Wed Oct 27, 2010 2:51 am

Sorry too! Should be running without trying to use the log as the input. Run the full command as shown. For reference.
71_FIL
Cadet
 
Posts: 2
Joined: Tue Oct 26, 2010 2:30 am

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby ito725 » Wed Nov 03, 2010 8:27 pm

it times out, make the time-out time longer, it dosen't seem to be in any sensible units, (i use 60000). i use leopard and that fixed it for me.

also make sure ur using the right version of java, took me a long time to realize that mac os x uses 1.5 as the default.
ito725
Cadet
 
Posts: 4
Joined: Sat Oct 16, 2010 8:37 pm

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby n.podbielski » Sun Nov 07, 2010 2:30 pm

How to run this visualization with bots written in OTHER languages than java?
I tried c# and python. Running bots as console programs working fine, but running them in visualization dosn't work

D:\dir>java -jar tools/PlayGame.jar maps/ma
p7.txt 1000 1000 log.txt "mybot.exe" "java -jar example_bots/DualBot.jar" | ja
va -jar tools/ShowGame.jar
WARNING: player 1 timed out.
Turn 1
Player 2 Wins!

How make this work?

PS.
Damn you, java!
n.podbielski
Cadet
 
Posts: 1
Joined: Sun Nov 07, 2010 2:25 pm

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby SamothRefoe » Mon Nov 08, 2010 8:46 am

SamothRefoe
Captain
 
Posts: 20
Joined: Fri Oct 15, 2010 5:26 pm

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby mago10 » Sat Nov 13, 2010 11:09 pm

My bot's ships disappears without a reason. doesn't happen with example bots.
putting the code below or changing the value of XXX changes the number of turns to disappear. Lower values of XXX takes longer to disappear:

if (pw.MyFleets().size() >= XXX) {
return;
}

(after this I execute the bot normally, so if the size is < XXX, I start fleets without watching the condition again so I can start more fleets than XXX)
(used command: java -jar tools/PlayGame-1.2.jar maps/map7.txt 1000 1000 log.txt "java MyBot" "java -jar example_bots/BullyBot.jar" | java -jar tools/ShowGame-1.2.jar)

here they are some test with different values of XXX:

without the code:
Turn 16
Player 2 Wins!

XXX=10:
Turn 18
Player 2 Wins!

XXX=5:
Turn 77
Player 2 Wins!

XXX=4:
game finishes correctly
Turn 98
Player 1 Wins!


EDIT: Solution found, it was my error, an illegal move. For debugging you can use the solution posed in
mago10
Cadet
 
Posts: 2
Joined: Sat Nov 13, 2010 10:35 pm

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby JimmFlimm » Mon Nov 22, 2010 11:50 am

I have a problem, I am using the c# starter package.

The bot sais the distance between my planet and the destination is 2, but in PlayGame.jar/ShowGame.jar the distance is actually 1, because on turn 1 I send the fleets to this planet and in turn 2 I already have it

edit:
calculated manually
distance is supposed to be 1.6241512550567194309118650732308 before ceil, so something must be wrong with the PlayGame.jar/ShowGame.jar right? or am I missing something?

edit2:
nevermind I didnt realize the visualizer shows the gamestate AFTER the actions has been made >_<
JimmFlimm
Captain
 
Posts: 25
Joined: Mon Nov 22, 2010 11:37 am

Re: Having problems with PlayGame.jar or ShowGame.jar?

Postby qulinxao » Fri Nov 26, 2010 7:53 am

my bot in MyBot.cs //sending in zip to ai-contest good.
but dont cant test local, why?
try:
java -jar tools/PlayGame.jar maps/map7.txt 1000 1000 log.txt MyBots.exe "java -jar example_bots/DualBot.jar" | java -jar tools/ShowGame.jar

in output:
ERROR: failed to start client: MyBots.exe
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 1
at ViewerPanel.run(ViewerPanel.java:85)
at java.lang.Thread.run(Unknown Source)


what wrong? (testing 2 java bots again each other was good)
qulinxao
Cadet
 
Posts: 2
Joined: Fri Nov 26, 2010 7:47 am

PreviousNext

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 2 guests

cron