[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/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 - Timeout on 1st turn

It is currently Fri Jul 21, 2017 10:38 am Advanced search

Timeout on 1st turn

Share and discuss ideas for your entries here.

Timeout on 1st turn

Postby Hippo » Wed Dec 21, 2011 11:40 pm

I am curious what happened in game http://aichallenge.org/visualizer.php?g ... &user=6888.
I have run my bot on that map on my 3 years old laptop 4 times in a row and there were no problems. I have expected the hardware for the finals would be faster ... . Are the bot's run in psoudoparallel, parallel or one after the other?

It's just one game, but if that happens several times, I would be disapointed :(.
Yes, I do some memory allocation on turn 1 to know how many hills I start with, but I don't think that would be critical.
Hippo
Lieutenant-Colonel
 
Posts: 49
Joined: Wed Mar 03, 2010 6:42 pm

Re: Timeout on 1st turn

Postby qgazq » Thu Dec 22, 2011 10:19 am

Hi,

I notice you are using Java and the map you show is a high hill count map.
This means on the first turn you will get a LOT of lines of information, 686 in this case.
If you're using the java starter kit with an unchanged parser it isn't very efficient and will probably eat up around 400ms of the turn.
I saw this happen a few times to my bot early on and was confused why I had <100ms of time left when I started (testing at home).
Obviously with fluctuations you get when running stuff this can easily knock you over the time limit even if you don't do much on your first turn.
I ran it through a profiler and found the cause.
I rewrote (tweeked slightly) the parsing and got it down to taking around 50ms for even a large initial input like this.

Regards
QGazQ
qgazq
Cadet
 
Posts: 6
Joined: Thu Dec 22, 2011 10:12 am

Re: Timeout on 1st turn

Postby Hippo » Thu Dec 22, 2011 10:59 am

Yes, I use java starter kit's parser. But on my 3 year old notebook with turn limit 800ms it has no problems with timeouts on that map .... Better parser could help and yes, longer limit for 1st turn as well.
Hippo
Lieutenant-Colonel
 
Posts: 49
Joined: Wed Mar 03, 2010 6:42 pm

Re: Timeout on 1st turn

Postby amstan » Fri Dec 23, 2011 8:46 am

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: Timeout on 1st turn

Postby Hippo » Fri Dec 23, 2011 5:02 pm

Hippo
Lieutenant-Colonel
 
Posts: 49
Joined: Wed Mar 03, 2010 6:42 pm

Re: Timeout on 1st turn

Postby amstan » Fri Dec 23, 2011 8:49 pm

You get it as a parameter when your bot starts. You should have used that instead of hardcoding it.
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: Timeout on 1st turn

Postby Hippo » Fri Dec 23, 2011 9:11 pm

Hippo
Lieutenant-Colonel
 
Posts: 49
Joined: Wed Mar 03, 2010 6:42 pm

Re: Timeout on 1st turn

Postby Scryer » Fri Dec 23, 2011 9:14 pm

This turn 0 crash seems pretty unusual also, since it's a Top 2 bot -- http://aichallenge.org/visualizer.php?game=331374
Scryer
Colonel
 
Posts: 72
Joined: Wed Nov 09, 2011 5:40 pm

Re: Timeout on 1st turn

Postby Hippo » Sat Dec 24, 2011 6:46 pm

So finally I left position 18 with the same issue ... on the same map which would be otherwise perfectly suited for my bot. And yes, it does not timeout on my laptop even with 500 ms per turn:(. Seems the parsing is slower on server while the other part of computation is probably faster there. ... So next time I would much more concentrate myself on speeding up the parser.
Hippo
Lieutenant-Colonel
 
Posts: 49
Joined: Wed Mar 03, 2010 6:42 pm

Re: Timeout on 1st turn

Postby Hippo » Sun Dec 25, 2011 1:59 pm

As I expected the multihill mazes favorizes me ... I have played locally with xiathis on 2_40 map with 500 ms per turn winning on turn 405 with score 22:4 ... may be I was just lucky ... .
I was lucky on next 10 games as well with results 21:6 498, 21:6 538, 21:6 595, 20:8 632, 21:6 649, 21:6 482, 21:6 577, 20:5 495, 21:6 459, 22:4 489. Than I start losing ... may be it was due to working on the comp and taking it some thinking time? ...
10:19 800, 8:20 523, than win 23:2 259 and finally 11:14 592 (31/154 xiathis timeout).

I suppose I would lose on single hill maps as well as small number of hill maps.

Yes, as expected, my bot had no chance on almost all other maps as xiathis has full controll around his gardens so symmetry helps only on neutral areas and small amount of hills means the neutral areas will be occupied quicker than symmetry eating could give sufficient advantage.

P.S.: Replaying the lost games (on 2_40 map) I cannot notice timeissues but xiathis was able to start gardening in these games. But it could be that the time issues were there ... symmetry food gathering is much more affected by time issues as it requires bfs's for longer distances usually I start overnumbering xiathis around turn 70 but in these two games xiathis kept par with me till he started gardening and the game was its.

... on the other side symmetry is much more helpfull when having bigger orbits ... meaning playing with more opponents ...
Hippo
Lieutenant-Colonel
 
Posts: 49
Joined: Wed Mar 03, 2010 6:42 pm


Return to Strategy

Who is online

Users browsing this forum: No registered users and 1 guest

cron