Skip to main content

A Python chess GUI application using pygame and python-chess with Stockfish support

Project description

Python Chess GUI

Demo

A Python chess application with a graphical user interface built using pygame and python-chess library, featuring player vs Stockfish AI gameplay.

Features

  • Player vs Stockfish AI gameplay
  • Color selection (play as White or Black)
  • Adjustable AI difficulty (Level 1-5)
  • Move takeback (undo)
  • Hint system and real-time evaluation bar (computed at chosen difficulty level)
  • Visual highlights for legal moves, last move, and check

Installation

macOS

# Install Stockfish and Python 3.12
brew install stockfish python@3.12

# Install pipx and the game
brew install pipx
pipx ensurepath
source ~/.zprofile
pipx install python-chess-gui --python python3.12

# Run the game
chess-gui

Debian/Ubuntu

# Install Stockfish and Python 3.12
sudo apt install stockfish python3.12

# Install pipx and the game
sudo apt install pipx
pipx ensurepath
source ~/.bashrc
pipx install python-chess-gui --python python3.12

# Run the game
chess-gui

Controls

  • Mouse click: Select piece / move piece / menu selection
  • H: Get a hint (Stockfish's suggested move)
  • Z: Undo last move
  • N: New game (return to menu)
  • Q / Escape: Quit

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_chess_gui-0.1.4.tar.gz (133.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_chess_gui-0.1.4-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file python_chess_gui-0.1.4.tar.gz.

File metadata

  • Download URL: python_chess_gui-0.1.4.tar.gz
  • Upload date:
  • Size: 133.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_chess_gui-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5ed4df47c6d0b0b481bf454a9cb13c90fff9f24906162fc2ffe909d071b539bc
MD5 165c1c1fe0e55ccfcb664c3522276324
BLAKE2b-256 7f864e364a1b1cf0447c58a03013abef29a4f52aa150343030a84f8d882995c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_chess_gui-0.1.4.tar.gz:

Publisher: publish.yml on Bobain/python-chess-gui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_chess_gui-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for python_chess_gui-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 63896c249a5953a5a34c35eee951b2fa3bce1fada70d21c020e9a540757884b8
MD5 f020a351d8961abe7e35d5950572ba73
BLAKE2b-256 f2fe63e0394f2f6de96b1add5cadbbd2f6b33a5c7d5979046fdbf0015c3fd09e

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_chess_gui-0.1.4-py3-none-any.whl:

Publisher: publish.yml on Bobain/python-chess-gui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page