An open API service indexing awesome lists of open source software.

https://github.com/allenjue/chess-engine

This is an interactive alpha-beta pruning chess engine with a user-friendly GUI.
https://github.com/allenjue/chess-engine

alpha-beta-pruning chess-engine java minimax-algorithm

Last synced: 2 months ago
JSON representation

This is an interactive alpha-beta pruning chess engine with a user-friendly GUI.

Awesome Lists containing this project

README

        

# Chess-Engine
Screen Shot 2022-07-07 at 12 10 55 PM

## Introduction
This Chess engine is an independent passion project designed to explore the applications of search algorithms in Chess. The program creates an interactive, turn-based GUI that allows for casual play and analysis of games with alpha-beta pruning.

## Features
This Chess engine is designed to provide suggestions for moves and is intended to be user-friendly. Legal moves are highlighted in yellow, and selected pieces are highlighted in green. This allows novice players to identify how the pieces move and enjoy playing chess in a more streamlined fashion.

Screen Shot 2022-07-07 at 12 07 47 PM

In the toolbar, helpful game information is given, such as the current player's turn, the state of the game (ongoing, checkmate, stalemate, or draw). A ```New Game``` button resets the state of the game. The ```Resign``` button forfeits the game from the current player's persective (TODO). The ```Undo``` and ```Redo``` buttons allow for successive moves to be undone and redone; they are implemented with a stack that is cleared when a new move is inputted.

The toolbar's text changes when certain board states occur, such as checkmate. The minimax algorithm's outputs are also inputted into the toolbar, which gives the current evaluation of the board. Currently, the engine can only search reasonably to a depth of 5.

Screen Shot 2022-07-07 at 12 08 23 PM

## To-do
* Create a visual list of suggested moves given the state of the board
* Create a visual list of captured pieces
* Create a list of moves to create a PGN and allow the engine to recreate a game based on a PGN
* Transition the search algorithm to a deep-learning algorithm
* Make the game window scalable
* Implement resign button
* Create a CPU to play against
* Re-implement the promotion popup, as currently pawns that promote are automatically promoted to queens

## Technologies
* Java 8 (```java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)``` preferred)
* Java Swing
* Java FX

## Setup and Launch
Download the code as a zip and navigate to the bin directory. From there run:

```java Gui```

to launch the chess game.