Skip to content

Tearth/Cosette

Repository files navigation

Cosette

Current version: v5.1 (Megumin), 07.06.2021

An UCI-compliant chess engine written in C# for .NET platform, with an official profile on CCRL (Computer Chess Rating Lists) where you can check the best strength estimation. Feel free to visit a dedicated forum thread for Cosette releases and discussions!

Cosette interactive console example

On the table below you can see how engines' strength was changing with the versions. Take note that usually the latest one has an estimated value, which will be updated later to a more concrete result.

Version Release date Elo Main changes
v5.0 (Megumin) 12.04.2021 2503 Futility pruning for quiescence search, razoring, late move pruning, BMI enabled by default, adjusted parameters of search and evaluation.
v4.0 (Komekko) 22.01.2021 2384 Futility pruning, static null-move pruning, evasion move generator, check extensions, adjusted parameters of search and evaluation.
v3.0 (Luna) 12.12.2020 2086 Multi-stage move generation and move ordering, internal iterative deepening, SEE pruning in quiescence search. New evaluation function for fianchetto.
v2.0 (Darkness) 19.10.2020 1985 A bunch of improvements for transposition tables, time management and move ordering. New evaluation functions: pawn shield, bishop pair, doubled rooks, a rook on the open file.
v1.0 (Aqua) 19.09.2020 1875 Initial release.

*value estimated

How to play?

The simplest way is to download the newest version from the Releases page and use it with a graphical interface like Arena or WinBoard. The engine has been tested extensively on the first one, but should work with every UCI-compliant GUI.

Cosette has an official account on lichess.org platform, which allows everybody to challenge her - feel free to do it!

https://lichess.org/@/CosetteBot

Algorithms

Board representation and move generating:

  • bitboards (with make/undo scheme)
  • magic bitboards
  • precalculated arrays with moves for knight and king
  • moves generator (quiet, loud, captures and evasions)

Evaluation:

  • material (incremental updating)
  • position (piece-square tables, incremental updating)
  • mobility
  • king safety
  • pawn structure (cached in pawn hash table)
  • doubled rooks
  • rooks on open files
  • bishop pair
  • fianchetto
  • tapering

Search:

  • negamax
  • alpha-beta pruning
  • transposition table
  • quiescence search with check detection
  • quiescence SEE pruning
  • iterative deepening
  • internal iterative deepening
  • staged move generating
  • null-move pruning
  • static null-move pruning
  • principal variation search
  • late move reduction
  • late move pruning
  • check extension
  • futility pruning
  • razoring

Move ordering:

  • staged move ordering
  • static exchange evaluation
  • killer heuristic
  • history heuristic

Additional tools

Arbiter

The simple console application which allows testing chess engines using super-fast time control (like 2s+20"). It has been designed to support Cosette development, but should be also usable with other UCI-compliant engines.

Cosette Arbiter

Tuner

A set of console applications (selfplay + Texel) and web interface, which allows adjusting engine parameters using standard UCI command setoption. Results are displayed on the local website using a set of tables and charts.

Cosette Tuner

Polyglot

The small library which allows using opening books saved in the Polyglot format. Feel free to use it if you need this in your own project.

Why Cosette?

https://www.youtube.com/watch?v=XuYF-EnpLpc