[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/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
AI Challenge Forums • View topic - Bot fails on first turn, only on ai-contest.com

It is currently Sat Sep 22, 2018 7:38 pm Advanced search

Bot fails on first turn, only on ai-contest.com

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

Bot fails on first turn, only on ai-contest.com

Postby medrimonia » Sun Oct 31, 2010 4:44 pm

I've written a new bot separated in 7 files in python, it's working without any problem on the TCP server, locally and in a "copy" of the official server, but when I upload it on ai-contest.com, I'm loosing every game in the first turn...

Does someone know about an issue specific to python (or not) which can cause this kind of problems?

(My Bot don't write to any files)

Thanks all.
medrimonia
Lieutenant
 
Posts: 10
Joined: Fri Sep 17, 2010 6:13 pm

Re: Bot fails on first turn, only on ai-contest.com

Postby RebelXT » Sun Oct 31, 2010 5:06 pm

was it a problem with main bot file name not being MyBot.py or time-out issue? it looks like your bot has just won a game, so you must have resolved the issue.
RebelXT
Colonel
 
Posts: 81
Joined: Fri Sep 10, 2010 2:05 pm

Re: Bot fails on first turn, only on ai-contest.com

Postby medrimonia » Sun Oct 31, 2010 5:09 pm

In fact I just uploaded an old bot, I had the same message each time:

medrimonia crashed/issued an invalid order/timed out

EDIT: I checked my .tar.gz and all the files are inside and the main is named MyBot.py

EDIT2: The .tar.gz is actually working good on our university server (clone of an old version of the ai-contest server)

EDIT3: My new bot is playing game on the tcp server, (I've a lot of "time out" because of a very bad connection, but never during the first turn and I haven't any disconnected or invalid order)

I'm sorry for my bad english...
medrimonia
Lieutenant
 
Posts: 10
Joined: Fri Sep 17, 2010 6:13 pm

Re: Bot fails on first turn, only on ai-contest.com

Postby medrimonia » Sun Oct 31, 2010 6:43 pm

I merged all the files in MyBot.py, and now it works, but I think it's a dirty solution.
medrimonia
Lieutenant
 
Posts: 10
Joined: Fri Sep 17, 2010 6:13 pm

Re: Bot fails on first turn, only on ai-contest.com

Postby amstan » Mon Nov 01, 2010 4:56 am

Make sure you're testing your bot with python 2.5.
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: Bot fails on first turn, only on ai-contest.com

Postby medrimonia » Mon Nov 01, 2010 5:13 am

medrimonia
Lieutenant
 
Posts: 10
Joined: Fri Sep 17, 2010 6:13 pm

Re: Bot fails on first turn, only on ai-contest.com

Postby amstan » Wed Nov 03, 2010 12:16 am

No, but if you have one bit of syntax that does not belong in python 2.5 it'll error and you'll get a timeout.
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: Bot fails on first turn, only on ai-contest.com

Postby medrimonia » Wed Nov 03, 2010 6:04 am

When I put all the files in one, it works, but the syntax don't change, the only part that change is that I don't work with multiple files.

With 6 files:
Work perfectly on local,
Work perfectly on university server (same code as the one of a previous release of ai-contest.com, I'll ask the admin to know if it's in python 2.5)
Work perfectly on TCP server,
crash everytime during first turn on ai-contest.com

With 2 files: (MyBot.py and PlanetWars.py, same code as before, it's only that all the files are in one):
Work everywhere


It's exactly the same code, the only thing that changes is the import of other files, that's why I think that something must be wrong in my imports, but I really can't find it...
medrimonia
Lieutenant
 
Posts: 10
Joined: Fri Sep 17, 2010 6:13 pm

Re: Bot fails on first turn, only on ai-contest.com

Postby SiMBa.Irkutsk » Thu Nov 04, 2010 5:27 am

SiMBa.Irkutsk
Cadet
 
Posts: 1
Joined: Thu Nov 04, 2010 5:25 am

Re: Bot fails on first turn, only on ai-contest.com

Postby amstan » Thu Nov 04, 2010 8:33 pm

Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Next

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 2 guests

cron