Page 1 of 1

Optimal strategy for a game on a binary tree

Posted: Tue Aug 26, 2014 6:20 pm
by wrongrook
I have been struggling to solve a problem from CodeForces involving the optimal strategy for a two player game played on a tree. (This is a problem from a finished contest - but no editorial has been published yet as far as I can see.)

I have put a description of the problem on Stack Overflow but have not got any answers yet.

Anyone here got any suggestions?

It actually makes for quite a fun two player game. I've coded up an implementation here if you want to just play the game against a friend. Don't press the "Find best move" button for depths of 5 or above as it will take forever. (It just uses a simple non-memoising minimax search for the moment.)