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.
- Host: GitHub
- URL: https://github.com/allenjue/chess-engine
- Owner: AllenJue
- License: apache-2.0
- Created: 2022-06-17T03:07:40.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-20T23:37:37.000Z (almost 3 years ago)
- Last Synced: 2025-01-21T11:33:58.728Z (4 months ago)
- Topics: alpha-beta-pruning, chess-engine, java, minimax-algorithm
- Language: Java
- Homepage:
- Size: 246 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Chess-Engine
## 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.
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.
## 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.