This repository contains a chess engine written in Python. Adding tools to train bots to play chess is a work in progress.
The Chess Engine provides the following features:
- Physics of the chess board
- Legal move generation for all pieces.
- Check, checkmate, stalemate detection.
- The basic chess rules such as castling and pawn promotion are included.
- The chess rules not included yet are: en passant, 50 move rule, 3-fold repetition.
- Python 3.10 or higher.
- numpy and other packages listed in requirements.txt
A chess game can be initialized as follows:
from engine import Game
game = Game()
print(game.board)
"""
◻ ◼ ◻ ◼ ◻ ◼ ◻ ◼
◼ ◻ ◼ ◻ ◼ ◻ ◼ ◻
◻ ◼ ◻ ◼ ◻ ◼ ◻ ◼
◼ ◻ ◼ ◻ ◼ ◻ ◼ ◻
◻ ◼ ◻ ◼ ◻ ◼ ◻ ◼
◼ ◻ ◼ ◻ ◼ ◻ ◼ ◻
◻ ◼ ◻ ◼ ◻ ◼ ◻ ◼
◼ ◻ ◼ ◻ ◼ ◻ ◼ ◻
"""