/nim

A simple nim game made by (and subsequently forgotten) by a young andre in early 2020. Game was made while exploring Q-learning concept. Perhaps some day I'll make a more robust model, but for now, this model is sufficiently 'smart' to be playable.

Primary LanguageJupyter Notebook

nim

You can find the rules of nim here. AI learns to play the game with Q-learning.

Run

  1. Clone with:
git clone https://github.com/4ndrelim/nim.git
  1. Run play.py
    • Play against AI by inputting the pile number and number of objects to remove.
  2. Adjust pre-defined hyperparams at config.py

nim execution