Algorithm Games

Algorithm Games

(by Rastislav Lenhardt, created as a TopCoder tutorial)

The games we will talk about are two-person games with perfect information, no chance moves, and a win-or-lose outcome.

First we will look at the basic division of positions to winning and losing. After that we will master the most important game -- the Game of Nim -- and see how understanding it will help us to play composite games. We will not be able to play many of the games without decomposing them to smaller parts (sub-games), pre-computing some values for them, and then obtaining the result by combining these values.

 

Full article: www.topcoder.com/tc?module=Static&d1=tutorials&d2=algorithmGames