It is currently Fri Jul 20, 2018 6:36 pm Advanced search

Can busy waiting bots steal cycles from opponents?

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

Can busy waiting bots steal cycles from opponents?

Postby montanalow » Sat Feb 27, 2010 2:16 am

I'm guessing that it is possible for a bot to busy wait when it is not their turn, and steal cycles from their opponents. It would be interesting to see which bots have the most opponents time out against them, or cause low value moves, so I'd like to start a log here.

montanalow vs hebbie
http://csclub.uwaterloo.ca/contest/visu ... id=4076621

@ move 40 when montanalow first moves south to touch the outside wall, South is only a valid move at minimax depth 0, which takes about 6 nano seconds of cpu time to calculate on my core 2. minimax depth 1, which takes ~0.1ms disqualifies south as a valid move.
montanalow
Lieutenant-Colonel
 
Posts: 42
Joined: Thu Feb 18, 2010 6:50 pm

Re: Can busy waiting bots steal cycles from opponents?

Postby montanalow » Sat Feb 27, 2010 2:21 am

montanalow vs janzert
http://csclub.uwaterloo.ca/contest/visu ... id=4077864

at move 9 when montanalow moves south and becomes catty-corner to the center oval, which forces a choice left or right, this is another minimax depth 0 only move. depth 1 and greater disqualify south. Again, depth 1 requires < 0.1ms.
montanalow
Lieutenant-Colonel
 
Posts: 42
Joined: Thu Feb 18, 2010 6:50 pm

Re: Can busy waiting bots steal cycles from opponents?

Postby montanalow » Sat Feb 27, 2010 2:24 am

montanalow vs cgy4ever

http://csclub.uwaterloo.ca/contest/visu ... id=4076242

at move 27, when montanalow splits his available area in half, by moving south. this is another move that is only valid at minimax depth 0, and indicates that my bot had <0.1ms of cpu time to actually compute a move.
montanalow
Lieutenant-Colonel
 
Posts: 42
Joined: Thu Feb 18, 2010 6:50 pm

Re: Can busy waiting bots steal cycles from opponents?

Postby montanalow » Sat Feb 27, 2010 2:29 am

montanalow vs brandonsmith
http://csclub.uwaterloo.ca/contest/visu ... id=4075736

at move 35, montanalow moves west, which divides his available area in half. this is another minimax depth 0 only move, again indicating < 0.1ms of cpu time to compute a valid move.
montanalow
Lieutenant-Colonel
 
Posts: 42
Joined: Thu Feb 18, 2010 6:50 pm

Re: Can busy waiting bots steal cycles from opponents?

Postby montanalow » Sat Feb 27, 2010 2:31 am

montanalow vs czafri
http://csclub.uwaterloo.ca/contest/visu ... id=4075785

montanalow subdivides his own territory at move 18. yet another minimax depth 0 only move.
montanalow
Lieutenant-Colonel
 
Posts: 42
Joined: Thu Feb 18, 2010 6:50 pm

Re: Can busy waiting bots steal cycles from opponents?

Postby Janzert » Sat Feb 27, 2010 2:39 am

I can say for my bot at least that it doesn't have any sort of busy wait or try to make use of time in any way when not it's turn. In fact the map reading code is basically the stock code supplied in the C++ starter kit modified only slightly as I changed map data structures. I think for whatever reason the server sandbox at times just acts very weird.

Janzert
Janzert
Contest Organizer
 
Posts: 271
Joined: Sun Feb 07, 2010 1:59 am

Re: Can busy waiting bots steal cycles from opponents?

Postby montanalow » Sat Feb 27, 2010 2:49 am

Glad to hear that Janzert. After seeing all these instances, I'm beginning to suspect that it's the tournament engine itself that is fundamentally flawed, as opposed to all the contestants being villainous scoundrels. I'm sure a lot of other bots are seeing these sorts of random penalties, and that it's not just me, but an environment where crippling penalties can be dealt to either bot at any move makes me sad.
montanalow
Lieutenant-Colonel
 
Posts: 42
Joined: Thu Feb 18, 2010 6:50 pm

Re: Can busy waiting bots steal cycles from opponents?

Postby iouri_ » Sat Feb 27, 2010 3:02 am

This is one of the reasons why I store as many computation results as possible between moves (though it does end up costing up to 600MB in RAM).

But that's actually a good question. Do the two bots run their computations concurrently, or is one bot asked for an answer and then the other?
iouri_
Brigadier-General
 
Posts: 105
Joined: Thu Feb 11, 2010 4:16 pm
Location: Toronto, Canada

Re: Can busy waiting bots steal cycles from opponents?

Postby montanalow » Sat Feb 27, 2010 3:05 am

That's a pretty good idea iouri,

I wonder if I can implement that in the next 1.5hours before the tournament deadline
montanalow
Lieutenant-Colonel
 
Posts: 42
Joined: Thu Feb 18, 2010 6:50 pm

Re: Can busy waiting bots steal cycles from opponents?

Postby jeff.cameron » Sat Feb 27, 2010 6:06 am

We did a bit of work yesterday to look into this sort of thing. We found that generally, each bot was being run on its own core. So if a bot is busy-waiting, I think the harm to the opponent would be small to none.
jeff.cameron
Contest Organizer
 
Posts: 91
Joined: Sun Jan 31, 2010 4:06 am


Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron