mikolaj-skrzypczak / chess-engine

Implementation of chess in python created while following a step-by-step YouTube tutorial by Eddie Sharick.
https://www.youtube.com/channel/UCaEohRz5bPHywGBwmR18Qww
44 stars 31 forks source link
ai chess chess-ai chess-engine chess-game game game-development

Python Chess Engine

Table of contents

General info

I have been playing chess since primary school and one day I had an idea to implement chess in Python. Then, I came across a tutorial by Eddie Sharick, who made a whole 16 episodes series covering the topic. This repository is a result of following his videos, sometimes coming up with some improvements on my own. Hereby, I highly encourage you to visit his YouTube channel and check the whole series by yourself.

Eddie's YouTube channel

First episode of "Chess engine in Python"

Technologies

TODO

Instructions

  1. Clone this repository.
  2. Select whether you want to play versus computer, against another player locally, or watch the game of engine playing against itself by setting appropriate flags in lines 52 and 53 of ChessMain.py.
  3. Run ChessMain.py.
  4. Enjoy the game!

Sic:

Further development ideas

  1. Ordering the moves (ex. looking at checks and/or captures) should make the engine much quicker (because of the alpha-beta pruning).
  2. Keeping track of all the possible moves in a given position, so that after a move is made the engine doesn't have to recalculate all the moves.
  3. Evaluating kings placement on the board (separate in middle game and in the late game).
  4. Book of openings.