This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-06-19 20:47:46

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Nim!

http://scratch.mit.edu/projects/bhz/574831

I made an AI for the game of Nim
It *should* play the game perfectly (without any mistakes, the only way to win is also to play perfectly)

The AI resigns only when there are 2 piles left on the board, and does so by taking one of the piles, leaving the other one for you to take and thus win

Note: does not work online. please download!

Last edited by bhz (2009-06-19 20:49:19)

Offline

 

Board footer