/Easy21

An illustration of Reinforcement Learning algorithms with the card game Easy21.

Primary LanguagePython

Easy21

An illustration of Reinforcement Learning algorithms with the card game Easy21.

Purpose

Reinforcement Learning is a sub-field in Machine Learning. The target of RL is to design an agent who can learn to maximize a certain utility through its interaction with the environment. RL has attracted much attention from the general public in recent years since it has beaten top human players in certain extremely complicated games including Go (Wei Qi).

This project illustrates several fundamental algorithms in RL with a card game known as Easy21. Currently, it includes Monte Carlo learning, Temporal Difference learning, learning with linear function approximation and Q learning. More algorithms will be added in the future.

About the card game

Easy21 is similar to Blackjack. The only difference is that in Easy21 the black card adds value and the red card subtracts value. If the player’s sum exceeds 21, or becomes less than 1, then he “goes bust” and loses the game. It is assumed that the game is played with an infinite deck of cards. This game has a very small state space and it serves as a good toy example.