console implementation of the Nim game with machine learning AI