lynx-chess / Lynx

Chess Engine, written in C#
https://lichess.org/@/Lynx_BOT
MIT License
47 stars 4 forks source link
chess chess-engine hacktoberfest

Lynx

Lynx build Lynx release

Introduction

Lynx is a chess engine developed by @eduherminio.

It's written in C# (.NET 8).

You can find Lynx:

Lichess bot can be played directly, but a chess GUI that supports UCI protocol is needed to play against the self-contained version.

Strength

See Releases for the complete list of versions.

Here are the ones 'properly' rated over at least a few hundred of games:

Version Date Estimated
elo0
CCRL CCRL
Blitz
MCERL CEGT
40/20
CEGT
40/4
CEGT
5+3 pb
1.7.0 2024-10-05 3101 2974 2936
1.6.0 2024-08-15 2952 2981* 3039
1.5.1 2024-06-21 2830 2851 2660 2690
1.5.0 2024-06-09 2817 2817
1.4.0 2024-03-21 2747 2753
1.3.0 2024-02-04 2651 2682 2653 2831
1.2.0 2024-01-11 2611 / 25511 2586 2862
1.1.0 2023-12-14 2533 2507 2426 2597
1.0.1 2023-11-20 2511 2433 2430 2566
0.19.0 2023-10-27 2434 2348 2508
0.18.0 2023-10-21 2283 2395
0.17.0 2023-09-19 2178 2368
0.16.0 2023-08-26 2053 1978
0.15.0 2023-08-13 2039 2098
0.14.1 2023-07-30 1670
0.13.0 2022-11-25 1637 1773
0.11.0 2022-09-18 1477
0.10.0 2022-05-09 1426
0.9.0 2021-11-29 1449
0.6.0 2021-10-19 1263
0.4.0 2021-09-20 1208

* Not enough games

0 CCRL Blitz elo estimation, based on 40+0.4 gauntlets vs other engines

1 After 2024-01-13 CCRL blitz elo recalculation, where Lynx 1.0.1 went from 2497 to 2432

Building Lynx

Lynx release artifacts are self-contained and require no dependencies to be run.

However, you can also choose to build Lynx yourself.

Requirements

If you're a Linux user and are new to .NET ecosystem, the conversation in this issue may help.

Instructions

Features

Feature list _Beware, most of the provided links contain outdated information and don't reflect the current implementation or the state of the art of computer chess programming, at this point they remain here mostly for historical reasons_. ### Search - NegaMax [[1](https://www.chessprogramming.org/Negamax)] - Quiescence Search [[1](https://www.chessprogramming.org/Quiescence_Search)] - Iterative Deepening Depth-First Search (IDDFS) [[1](https://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search)] [[2](https://www.chessprogramming.org/Iterative_Deepening)] - Aspiration Windows [[1](https://web.archive.org/web/20071031095918/http://www.brucemo.com/compchess/programming/aspiration.htm)] [[2](https://www.chessprogramming.org/Aspiration_Windows)] - Principal Variation Search (PVS) [[1](https://web.archive.org/web/20071030220825/http://www.brucemo.com/compchess/programming/pvs.htm)] - Null-move pruning (NMP) [[1](https://web.archive.org/web/20071031095933/http://www.brucemo.com/compchess/programming/nullmove.htm)] [[2](https://www.chessprogramming.org/Null_Move_Pruning)] - Late Move Pruning (LMP) - Futility Pruning (FP) - Reverse Futility Pruning (RFP) - History pruning - Late Move Reductions (LMR) [[1](https://web.archive.org/web/20150212051846/http://www.glaurungchess.com/lmr.html)] [[2](https://www.chessprogramming.org/Late_Move_Reductions)] [[3](https://talkchess.com/forum3/viewtopic.php?f=7&t=75056#p860118)] - Internal Iterative Reduction (IIR) - Check extensions [[1](https://www.chessprogramming.org/Check_Extensions)] - Static Exchange Evaluation (SEE) for move ordering, reduction and QSearch pruning - Razoring [[1](https://www.chessprogramming.org/Razoring)] - Killer heuristic [[1](https://www.chessprogramming.org/Killer_Heuristic)] - History heuristic: quiet history, capture history, continuation history, history malus [[1](https://www.chessprogramming.org/History_Heuristic)] - Countermoves ### Evaluation - Piece-Square Tables (PSQT) [[1](https://www.chessprogramming.org/Piece-Square_Tables)] - King-bucketed PSQT - Enemy king PSQT - Mobility (knight, bishop, rook, queen) - Bishop pair - Bishop penalty for same color pawns - Bishop penalty for blocked central pawns - Rook in open and semi-open files - King pawn shield, king virtual mobility, king in open and semi-open files - Isolated pawns - Passed pawns, including bonus for not opponent pieces ahead and friend/opponent king distance to it - Pawn phalanx - Pieces protected and attacked by pawns - Pieces capable of deliverying checks - Eval scaling with pawn count and 50 moves rule - 50 moves rule eval scaling ### Miscellaneous - PEXT Bitboards [[1](https://www.chessprogramming.org/BMI2#PEXTBitboards)] [[2](https://analog-hors.github.io/site/magic-bitboards/)] - Zobrist hashing [[1](https://www.chessprogramming.org/Zobrist_Hashing)] - Transposition Table [[1](https://web.archive.org/web/20071031100051/http://www.brucemo.com/compchess/programming/hashing.htm)] - Triangular PV-Table [[1](https://www.chessprogramming.org/Triangular_PV-Table)] - Most Valuable Victim - Least Valuable Aggressor (MVV-LVA) [[1](https://www.chessprogramming.org/MVV-LVA)] - Incremental move sorting - Hard/Soft time management - Expected moves to go [[1](https://expositor.dev/pdf/movetime.pdf)]

Credits

Lynx development would simply not have been possible without:

I would also like to extend my gratitude to:

Thanks also to all the testers that invest their time in computer chess, especially those ones that test lower rated engines (as opposed to only top ones).