Minimax Algorithm

Hello guys, I have been teaching myself the minimax algorithm and I have been able to create a Tic-Tac-Toe game with an unbeatable AI. I wanted to create more games with the algorithm and I came upon this problem:

Problem : Two players have in front of them a single pile of objects, say a stack of 7 pennies. The first player divides the original stack into two stacks that must be unequal. Each player alternatively thereafter does the same to some single stack when it is his turn to play. The game proceeds until each stack has either just one penny or two—at which point continuation becomes impossible. The player who first cannot play is the loser. Show, by drawing a game tree, whether any of the players can always win.

I have been trying to solve this all day but was unsuccessful as I am still quite new to the minimax algorithm and it would be helpful if someone could give me a link to an article or a book even that takes you step by step to creating this sort of Nim version. Thank you so much.

Regards.
Topic archived. No new replies allowed.