Skip to content

kelseyde/calvin-chess-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calvin is a chess engine written by @kelseyde.

It is written in Java (JDK 21).

Currently playing on Lichess: https://lichess.org/@/Calvin_Bot

Ranked ~300th on the Computer Chess Rating Lists blitz leaderboard: https://www.computerchess.org.uk/ccrl/404/

Strength

The table below tracks the strength of release versions, on the CCRL computer chess leaderboards and on Lichess.

Version Release date Lichess CCRL Blitz
3.3.0 2024-05-10 ~2550 2453
3.2.0 2023-12-09 ~2400 2233
3.1.0 2023-12-05 ~2390 -
3.0.0 2023-12-02 ~2380 -
2.6.2 2023-11-12 ~2300 2173

Features

Board representation

  • Bitboards of each piece type/colour are used for internal board representation.

Move Generation

Search

Move Ordering

Evaluation

  • Texel Tuning: all evaluation parameters are tuned using Texel's tuning method.
  • Material: basic material count, bishop pair bonus
  • Piece square tables: asymettrical PSTs
  • Tapered eval: evaluation tapered based on opening/middlegame/endgame phase
  • Pawn structure: passed pawn bonuses, isolated/doubled pawn penalties.
  • King safety: bonus for a pawn shield around the king, penalty for a pawn storm towards the king, penalty for open file around the king.
  • Incremental updates: Evaluation is updated incrementally with make/unmake move

Opening Book / Endgame Tablebase

  • Simple opening book loaded from a .txt file on startup. Can be disabled using the 'OwnBook' UCI option.
  • Calvin can probe the Lichess Tablebase API for endgames of 7 men or fewer. Can be disabled using the 'OwnTablebase' UCI option.

Communication

  • Calvin communicates using the Universal Chess Interface (UCI) protocol.
  • Pondering, where the engine thinks on the opponent's move. Can be disabled via the UCI.
  • Hash size and number of Lazy SMP threads are also configurable via the UCI.
  • Calvin is connected to Lichess where he plays regularly in the engine pool: https://lichess.org/@/Calvin_Bot

Perft results (starting position):

Depth Nodes Speed
1 20 PT0.000004S
2 400 PT0.000009S
3 8902 PT0.003844S
4 197281 PT0.025309S
5 4865609 PT0.123557S
6 119060324 PT1.363415S

Special Thanks To...

If you would like to contribute, or just talk about chess/chess programming, get in touch!