abdeldayem02 / Nim

an AI that teaches itself to play Nim through reinforcement learning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

an AI that teaches itself to play Nim through reinforcement learning.

In the game Nim, we begin with some number of piles, each with some number of objects. Players take turns: on a player’s turn, the player removes any non-negative number of objects from any one non-empty pile. Whoever removes the last object loses.

There’s some simple strategy you might imagine for this game: if there’s only one pile and three objects left in it, and it’s your turn, your best bet is to remove two of those objects, leaving your opponent with the third and final object to remove. But if there are more piles, the strategy gets considerably more complicated. In this problem, we built an AI to learn the strategy for this game through reinforcement learning. By playing against itself repeatedly and learning from experience, eventually our AI will learn which actions to take and which actions to avoid.

About

an AI that teaches itself to play Nim through reinforcement learning.


Languages

Language:Python 100.0%