Skip to content

CS238 Final Project: Reinforcement Learning for Minichess Variants

Notifications You must be signed in to change notification settings

AJArnolie/minichess-RL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS238 Final Project: Reinforcement Learning for Minichess Variants

animated

Abstract

In our project, we apply reinforcement learning to chess variants, with a particular emphasis on so-called "minichess" rulesets. Chess is an oft-studied and widely popular game that is commonly framed as a sequential decision-making problem. Although the rules of chess are relatively simple, substantial uncertainty is generated by the sheer number of possible moves in any given chess position. Contemporary approaches to chess engine development have traditionally combined search algorithms with position evaluation heuristics. More recent engines, such as AlphaZero, have applied self-play reinforcement learning (trained using massive computational resources) to achieve equivalent and occasionally superior results. Minichess variants, such Silverman 4×5, reduce the computational intractability of chess by shrinking the board and reducing the number of pieces.

In our project, we apply reinforcement learning techniques in an attempt to produce human-level results in Silverman 4×5, a minichess variant. To this end, we tuned a minichess playing agent using Monte Carlo Tree Search and evaluate this agent against basic Random and MiniMax agents. We also developed a minichess GUI program from scratch to visualize these games, modify variables, and do further testing.

Basic Chess Rules Implementation Used: https://github.com/mdhiebert/minichess

Minichess Variant: Silverman 4×5

Screen Shot 2023-02-18 at 4 55 16 PM

Silverman 4×5 is a simplified chess variant which reduces the board to 4 columns and 5 rows. Each player has four pawns, two rooks, one queen, and one king as can be seen in the image above. The rules of this variant are the same as traditional chess in terms of piece movement and promotion. However, castling or en-passant are not allowed in this variant. Additionally, we removed the ability of the pawn to move two squares from the starting row for the sake of simplifying the state space.

Usage

Clone this repo

git clone https://github.com/AJArnolie/minichess-RL.git
cd minichess-RL

Modify agent parameters at top of chessGUI.py

vim chessGUI.py

Run GUI

python3 chessGUI.py

Non-GUI option available as well (though not recommended)

python3 chess.py

About

CS238 Final Project: Reinforcement Learning for Minichess Variants

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages