[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 - Threading question

It is currently Mon Dec 10, 2018 12:01 pm Advanced search

Threading question

Random stuff about the contest, posts that don't fit in the other forums.

Threading question

Postby Terr » Wed Sep 15, 2010 3:08 am

The rules say threads are disallowed, and that there's a 1-second responsiveness limit... There seems to be a bit of a loophole implicit in the starter-kits.

Particularly: Can bots continue to do work in the time between issuing orders and waiting for a new game-state, or is the expectation that they do everything inside the conventional limited time-window?

Different languages may vary in their potential to continue doing work "around the clock" (still in a single thread) rather than block waiting for the next game-state. (This becomes a bit more interesting when you consider that zero-sized fleets may be used to slow down the game engine in order to buy more dead-time.)
Terr
Brigadier-General
 
Posts: 155
Joined: Mon Sep 13, 2010 9:19 pm

Re: Threading question

Postby amstan » Wed Sep 15, 2010 1:12 pm

There is no extra time.
Our goals is to run both bots at the same time and as soon as they both submit a planet the next call comes.
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: Threading question

Postby dstufft » Wed Sep 15, 2010 1:44 pm

well theortically if your bot returns it's command, and the other bot hasn't yet that time would be the "inbetween time".
dstufft
Lieutenant
 
Posts: 17
Joined: Mon Sep 13, 2010 2:06 am

Re: Threading question

Postby DanielVonFange » Wed Sep 15, 2010 2:20 pm

If you want to keep processing, while waiting for the server to get back to you with the next turn, go ahead! That's not a problem at all, since the time it takes to run a match won't be affected.
DanielVonFange
Brigadier-General
 
Posts: 149
Joined: Wed Sep 08, 2010 1:15 pm

Re: Threading question

Postby jmcarthur » Wed Sep 15, 2010 6:07 pm

With the current wall-clock timer, you are allowed to process between sending orders and receiving state all you want. I did this in the last contest, and it gave a noticeable improvement to my bot!

However, if the contest switches to CPU time, there is a chance that this will then make your bot overrun the time limit (e.g. you used up a second for your turn and then some extra between turns, and the way the server would measure your CPU time might necessarily include this extra time).
jmcarthur
Colonel
 
Posts: 80
Joined: Fri Feb 05, 2010 3:41 pm

Re: Threading question

Postby Tracer » Wed Sep 15, 2010 6:14 pm

Tracer
Captain
 
Posts: 29
Joined: Sat Sep 11, 2010 7:32 pm

Re: Threading question

Postby DanielVonFange » Wed Sep 15, 2010 7:55 pm

Bot's A and B run simultaneously, so continued computation does not disadvantage your opponent.

So the tournament engine looks like this:

* sends out turn information to both bots
* both bots simultaneously process the turn.
* when both bots have answered, or one one second is up, process the turn
DanielVonFange
Brigadier-General
 
Posts: 149
Joined: Wed Sep 08, 2010 1:15 pm

Re: Threading question

Postby Vector_Matt » Thu Sep 16, 2010 12:13 am

Vector_Matt
Captain
 
Posts: 27
Joined: Fri Sep 10, 2010 7:01 pm

Re: Threading question

Postby Terr » Thu Sep 16, 2010 1:13 am

I'm pretty sure each bot runs within its own process, and the game-server is a third process. How exactly those are distributed is trickier and will depend on the contest hardware and how things are being launched.

Even prohibiting threads in bots, two CPU-intensive bots may end up competing for the same core, in which case whichever one (if either) fails to retain responsiveness will disqualify through the 1-second limit.
Terr
Brigadier-General
 
Posts: 155
Joined: Mon Sep 13, 2010 9:19 pm

Re: Threading question

Postby Tracer » Thu Sep 16, 2010 5:38 am

Tracer
Captain
 
Posts: 29
Joined: Sat Sep 11, 2010 7:32 pm


Return to Misc

Who is online

Users browsing this forum: No registered users and 1 guest

cron