CederChess - a chess engine by Claus Cederberg

CederChess is a chess engine written in the C++ programming language. It is an ungoing project, and hopefully the future versions will become better and better.

It all started many years ago when I was a student. Me and a co-student wrote a chess engine called ChickenChess in the start 1990s. All programs we wrote at that time was called something starting with "Chicken", because of the chicken scenes in the movie Back to the Future. The engine wasn't particulary good, but we passed the examination.

Then around 2014 or so, I read a paper describing an engine where the evaluation score only depended on material and positions, nothing else. I think it was this: Simplified Evaluation Function

Then in 2022, I was again interested in chess and chess engines and decided to rewrite the Java program to a C program and get it on CCRL Blitz. The rewriting took some effort, because I also wanted it to be faster and have a slightly better evaluation function, and I haven't wrote a single C line in around 25 years. It was first in 2023, I dared to send in the program (cederchess1), and now it is on the CCRL Blitz with a first initial ELO rating of 1203 - later adjusted to 1027 after changes in ELO calculation. Here is the PGN file with all 510 games played by the CCRL team in order to get that rating.

 

CederChess 2 (18. January 2024)

This version is the latest version with 1220 ELO (30. August 2024). There are no know issues with this version. Main changes from version 1 are:

Source code: cederchess2.cpp - compile with "g++ cederchess2.cpp -O3 -o cederchess2"

 

CederChess 1 (12. August 2023)

First version. Highlights:

  1. A single file program with less than 1700 lines of code.
  2. Uses UCI (Universal Chess Interface) protocol.
  3. The evaluation function is mainly based on material and positions.
  4. Search for best move is done by the Minimax algorithm with alpha-beta pruning

Known issues:

  1. Detecting of threefold repetition is broken.
  2. Once in a while the engine tries to promote an officer to a queen.
  3. Originally the engine stopped execution, when it was compiled to a 64-bit architecture. There is a small hack in this versions so it now works.

Source code: cederchess1.c - compile with "gcc cederchess1.c -O3 -o cederchess1"