Artificial Intelligence - How to implement Nim game using Python?
Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps or piles.
On each turn, a player must remove at least one object, and may remove any number of objects provided they all come from the same heap or pile.The goal of the game is to avoid taking the last object.
2:52 - Game #1 (AI wins)
3:30 - Game #2 (Human wins)
Source code of the project demonstration is given below:
https://github.com/diesel707/Knights/tree/nim
Comments
Post a Comment
If you have any doubts, please let me know