My advice, without going into Java implementation details, is:
- Make sure you're using wall clock and not CPU clock.
- Check the time out frequently. I think on my computer I end up checking it about every 1-2 ms, and even that is still kinda risky. Judging by the sentence "4 cyles event with a 100ms deadline", it sounds like you might be checking it not often enough. I'd check the time often within a single cycle, and stop early if the time's up.
- Make sure minimal processing is done after the bot is out of time, e.g. do minor cleanup and output the moves to stdout.
Statistics: Posted by iouri_ — Sat Nov 27, 2010 6:04 pm