Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Minimax will never lose at tic-tac-toe: an AI Algorithm Explained, Ruby example (flyingmachinestudios.com)
3 points by nonrecursive on Jan 11, 2012 | hide | past | favorite | 2 comments


This was a fun exposition, but the "min" part is unclear as shown because the author does not explicitly show a look-a-head plan.

When the computer is playing reactively i.e. only planning the next move it needs to only do a max, execute the move and wait to see what the opponent does.

The "min" comes in when the computer is building a tree of not only its next move, but also of its opponent's next move so it can plan the next-next move and so on.


Thanks for the feedback! I'll add an example of that in the next couple days.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: