[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 - Has anyone found a reliable solution for timeout problems?

It is currently Tue Jan 16, 2018 9:44 am Advanced search

Has anyone found a reliable solution for timeout problems?

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

Has anyone found a reliable solution for timeout problems?

Postby mogron » Wed Nov 24, 2010 1:52 pm

Hello,

my new bot does some intense processing. Since this lead to timeouts, I built in some very strict checks. Essentially, my bot should now be restricted to less than 0.5 seconds. I still time out regularly on the contest server.

I used C++ with gettimeofday(), so wall time, not cpu time.

On my own machine, my bot never times out (and never crashes in any other way), even when only given half a second per turn.

I'm slowly getting desperate. Has anyone found a robust solution to this problem?

Thanks
mogron
Lieutenant
 
Posts: 18
Joined: Mon Sep 20, 2010 9:07 am

Re: Has anyone found a reliable solution for timeout problem

Postby Mistmanov » Wed Nov 24, 2010 2:09 pm

Are you sure that the problem isn't caused by games on the official server having gamestates that you never see in local testing? (e.g., my bots will never attack a neutral with less than is required to conquer it. So in local testing, a neutral with 0 ships will never occur, while it may occur in other games, where it can cause crashes/infinite loops/etc). Have you tried downloading the gamestate that caused the crash, and then calculate that turn on your own pc?

If it's not that I can't help you I'm afraid. My bot takes something like 10 ms per turn, so I haven't encountered any "real" timeout problems (but plenty where some unforseen bug was causing timeouts =))
Mistmanov
Colonel
 
Posts: 70
Joined: Fri Sep 24, 2010 6:50 pm

Re: Has anyone found a reliable solution for timeout problem

Postby mogron » Wed Nov 24, 2010 5:55 pm

I ran the timeout-states locally, but am not sure how to interpret the results. The bot finishes the turn, but in the last turn either I or the enemy supposedly has zero planets, always - is this normal when there's a crash?

I also wanted to say that I have tested my bot on the tcp-server, and had no trouble there (a few timeouts because of connection, but nothing like on the contest server. Compare http://72.44.46.68/getplayer?player=mogr and http://ai-contest.com/profile.php?user_id=6922).

Edit: also, the problem might not be timeout-related. The problems often appear early in the game, where there is not much processing done. But it's still a problem I can't reproduce outside the contest server.
mogron
Lieutenant
 
Posts: 18
Joined: Mon Sep 20, 2010 9:07 am

Re: Has anyone found a reliable solution for timeout problem

Postby Mistmanov » Wed Nov 24, 2010 6:25 pm

When your bot crashes/makes an invalid move/times out, the visualizer that came with the starter package does show that all your planets 'turn neutral', yes. The visualizer on the website only shows the gamestate before you crash, while I think that the visualizer that came with the starter package also shows the gamestate after you crash.

So yeah, I'm guessing there's just something about the opponents on the official server that makes your bot crash more often (you might see less crashes on the tcp server since it's mostly used by high level bots, that show different behavior than the bots in the >1000 range that you're now playing in)
Mistmanov
Colonel
 
Posts: 70
Joined: Fri Sep 24, 2010 6:50 pm

Re: Has anyone found a reliable solution for timeout problem

Postby mogron » Wed Nov 24, 2010 7:35 pm

mogron
Lieutenant
 
Posts: 18
Joined: Mon Sep 20, 2010 9:07 am


Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron