Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
/ domichess Public archive

A simple chess game for Windows, written in Python

License

Notifications You must be signed in to change notification settings

devfred78/domichess

Repository files navigation

GitHub release (latest by date) GitHub license GitHub issues GitHub pull requests Code style: black

DomiChess

A simple chess game for Windows, written in Python.

About the project

This project aims to develop and provide the simplest, the most intuitive and user-friendly interface for playing chess on Windows. If you are a casual user of this platform, then playing a game should be as simple as putting a real chess board on a table !

DomiChess 0.1.0 in action !

Main features

  • Only one click needed to start a game between 2 human, local opponents
  • Possibility to personalize the name of the game and the opponent's names
  • Display the move capabilities when a piece is clicked
  • Chessmate detection
  • Detection of automatic draws: stalemate, insufficient material, seventy-five-move rule, fivefold repetition
  • Detection of claimable draws: fifty-move rule, threefold repetition
  • Ability to add UCI-compliant chess engines (see below what it means)
  • With at least one engine installed:
    • Possibility to be helped for the next move
    • Basic engine configuration that can be different for each opponent, even if the engine chosen is the same one
    • Play against the computer
    • Let play the computer against itself (with the same or between different engines if at least two are installed)
  • (Planned, not yet implemented) Play against a remote opponent, on the same local network or on Internet

Built with

This project is mainly based on the 2 following libraries:

  • python-chess: a chess library for Python. This library provides tools for move validation, end-game condition check, board rendering and communication with chess engines.
  • pySimpleGUI: Python GUIs for humans. This library makes the build of Graphical User Interfaces (GUI) easier and funnier than ever. All displayed elements of the project are built using this library.

Getting Started

Prerequisites

DomiChess is only compatible with Windows version 10 or above. However, it can be executed on 32-bit or 64-bit variation of this operationg system (you have to download the matching file though).

Even if not strictly required for a basic usage of DomiChess, it is highly recommended to add at least one chess engine. With this additional program, not distributed alongside DomiChess, you are able to play alone against your computer, to ask for help during your game against a human or computarized opponent, or even to see your computer playing against itself.

Since the appearance of the first chess engines as computer programs independant from their graphical interface counterparts (in 90's), protocols have been developped to rule the communications between the two program families. Nowadays, the Universal Chess Interface (UCI) is one of the most popular protocols.

The UCI protocol is natively supported by DomiChess, that is, in that way, theorically compatible with all UCI-compliant chess engines.

Here are some examples of UCI-compliant chess engines available for Windows (list in alphabetical order):

  • Ethereal (Open-source, standard version: free, NNUE (Efficiently-Updated Neural Network) version: commercial)
  • MadChess (open-source, free)
  • Monolith (open-source, free)
  • Rybka (proprietary, commercial, old version available for free)
  • Shredder (proprietary, commercial)
  • Stockfish (open-source, free)

Of course, there are plenty of other UCI-compliant chess engines ! Some web sites attempt to list them. Try the following ones to begin your search:

Alternatively, you can search "UCI chess engine" on Github.

Installation

First installation

The installation of DomiChess is very easy: download the suitable executable from the latest release page, and put it in the folder of your choice. And that's it !

The first time you execute DomiChess, an engines folder is created in the same location as where you place the program. Copy here your favorite chess engines (consisting of at least an *.exe file, occasionally along with configuration or database file(s)). During the next launch, DomiChess will automatically detect the compatible engines.

Update

For updating DomiChess, just replace the older release by the most recent one, in the installation folder. You can let in place the chess engines you previously copied in the engines folder.

Usage

Basically, you can start a chess game between two local, human opponents by just clicking on the following button: Start

But if you wish to personnalize your game, or if you want to play against a customized AI, you needs to deal a little bit more with your mouse and your keyboard... Nothing complicated though, the DomiChess interface has been designed to be as intuitive as possible.

See the USAGE.md file for more detailed explanations about the usage.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement" or "bug", according to whether you want to share a proposal of a new function, or to record an anomaly.

Don't forget to give the project a star! Thanks again!

See the CONTRIBUTING.md file for deeper instructions about contribution on DomiChess.

License

Distributed under the GNU GPLv3 license. Check out LICENSE.md file for more information.

Acknowledgments

I would like greatfully to thank:

Niklas Fiekas for his powerful chess library for Python.

pySimpleGUI authors for making ALL Python programmers (even the less experienced !) able to make GUI programs.

Kozea for choosing to freely share (under LGPL license) its very interesting CairoSVG library, that helps to display all the SVG files generated by python-chess.

Developers of Cairo, on which CairoSVG is based, for providing their rich 2D graphics library.

Authors of PyInstaller for this remarkable program able to bundle a Python application and all its dependencies into a single package.

Python Software Foundation for black, their "uncompromising Python code formatter", making your whole code source compliant with PEP 8 in only one simple command.

Make a README, Sayan Mondal, Hillary Nyakundi and othneildrew for providing very interesting materials to write good README files (far better than I can write by myself !).

Choose an open source license for helping to choose the best suitable license for this project.

Semantic Versioning for providing clear specifications for versioning projects.

Real Python for contributing really increasing skills in Python for everyone, novices or veterans.

GitHub for hosting this project, and helping to share it.

And, of course, all the former, current and further contributors of this project !