It is currently Sun Jun 25, 2017 12:18 am Advanced search

Problems with my bot in the last week

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

Problems with my bot in the last week

Postby devore » Thu Mar 04, 2010 2:22 am

I wrote a simple min max bot that was chugging along nicely until last week. Looking at my replays it suddenly started diving head first into walls for no reason what so ever. Running in a test environment locally I can't recreate the problem. Did something change server side change at the beginning of last week that would have thrown my code out of whack like this?

I know its a little late now, it's just confusing why it suddenly started behaving so erratically (it's the same code, I didn't upload any new versions).
Posts: 1
Joined: Sat Feb 06, 2010 4:38 pm

Re: Problems with my bot in the last week

Postby dutchflyboy » Mon Mar 08, 2010 9:01 pm

Have you tried putting the bot in exactly the same situation (there is a javascript tool in the forum for this)? Maybe give him less CPU time, or more?

EDIT: I just remembered, my bot had the same behaviour at some time. It was because he calculated far enough to see that he'd always lose. The choice then became more or less random, and sometimes hit the wall. To counter that, I put a function after the minimax algorithm that checked wether the asked move was valid, and if it wasn't, choose a random move that's not a wall, random is better than crashing. Later I also corrected the source of the problem, but that's quite specific to my code and will probably be useless for you.
Posts: 57
Joined: Sun Feb 07, 2010 1:08 am

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest