Skip to content

DexterCarpenter/ChessDex

Repository files navigation

ChessDex

Tests

My attempt at programming a chess engine from scratch

Environment

Enter python environment

source /workspaces/ChessDex/.venv/bin/activate
. .venv/bin/activate

Play UI (prototype)

Start the local web UI (board in the browser, JSON API on port 8765):

source .venv/bin/activate
python src/play_ui.py
# or: python src/main.py

Open http://127.0.0.1:8765/ — click squares to move, choose mode (human/human, vs engine, engine/engine), toggle Show engine best move, undo, etc. Terminal-only play: python src/play_solo.py.

Hosted demo (after deploy): https://chessdex.onrender.com — also embedded at dextercarpenter.github.io/chessdex.

Unit Testing

pytest -v

Load a PGN

from pathlib import Path
from models.bitboard import Board

PATH_TO = Path(__file__).parent / "path" / "to"
board = Board().from_pgn(PATH_TO / "easyM2.pgn")

About

My attempt at programming a chess engine from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors