Skip to content

Chess engine implamented in Pytorch with Qt5 frontend ⭐

Notifications You must be signed in to change notification settings

arozx/a-level_project

Repository files navigation


Chess app

Bishop

A Python bot that plays chess against you
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Testing
  5. Licence
  6. Contact

About The Project

A full stack chess app using PyQt5 for the frontend and a engine writen using pytorch. This project is designed to meet the AQA computer Science Alevel Spesification.

(back to top)

Getting Started

Prerequisites

Python versions 3.9 - 3.12 are supported. You can download the latest version of python from here

Installation

Clone the github repo by running

git clone https://github.com/arozx/a_level_project.git

Install the required packages by running

pip install -r requirements.txt

Download a lichess shard you can use any but I recomend the 2014-09 shard as it is roughly 1,000,000 games and about 0.2GB in size. You can download the shard by running

mkdir lichess
cd lichess
wget https://database.lichess.org/standard/lichess_db_standard_rated_2014-09.pgn.zst

Next you will need to extract the shard by running

zstd -d lichess_db_standard_rated_2014-09.pgn.zst

Note, if you are using a different shard you will need to change the file name in the above commands. And you will need to change the file name in the pgn_to_db.py file line 154.

Finally you will need to run a script to convert the pgn to a database file. You can do this by running

python3 pgn_to_db.py

(back to top)

Usage

To run the program use the following comand

python chess_board.py

Testing

To run the tests, first install pytest by running

pip install pytest

Then run the tests by running

pytest

License

Images

Images used in this project are from Wikimedia Commons. The images are under the Creative Commons license. Please see the individual image pages for more information on the copyright holder and the specific license conditions.

Contact

Mastodon - @arozx

Project Link: https://github.com/arozx/a-level_project

(back to top)

About

Chess engine implamented in Pytorch with Qt5 frontend ⭐

Topics

Resources

Stars

Watchers

Forks

Languages