Skip to content

lynx-chess/Lynx

Repository files navigation

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:

Lynx version Release date Estimated elo CCRL Blitz CCRL MCERL CEDR
1.4.0 2024-03-21 2747
1.3.0 2024-02-04 2651 2650 2682 2831
1.2.0 2024-01-11 2611 / 25511 2584 2862 2738
1.1.0 2023-12-14 2533 2429 2506 2597
1.0.1 2023-11-20 2511 2431 2435 2566 2648
0.19.0 2023-10-27 2434 2347 2508 2469
0.18.0 2023-10-21 2283 2395
0.17.0 2023-09-19 2178 2368 2275
0.16.0 2023-08-26 2053 1986 2165
0.15.0 2023-08-13 2039 2098 2237
0.14.1 2023-07-30 1677 2012
0.13.0 2022-11-25 1645 1773 2029
0.12.0 2022-10-07 2071
0.11.0 2022-09-18 1487
0.10.0 2022-05-09 1439 1792
0.9.0 2021-11-29 1460
0.6.0 2021-10-19 1274
0.4.0 2021-09-20 1220

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

  • .NET 8 SDK. You can find instructions about how to install it in your preferred OS/Distro either here or here.

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

Instructions

  • Clone the repo and preferably checkout one of the tagged commits.

  • Run make to build a self-contained binary similar to the pre-compiled ones.

    Disclaimer: I do not use the Makefile myself, which means it is not fully tested and may occasionally get out of date.

  • Alternatively, you can get the exact dotnet publish (...) command from release.yml that is used by the CI to create the binaries and run it yourself (with the right runtime identifier).

    Examples:

    dotnet publish src/Lynx.Cli/Lynx.Cli.csproj -c Release --runtime linux-x64 --self-contained /p:Optimized=true -o /home/your_user/engines/Lynx
    dotnet publish src/Lynx.Cli/Lynx.Cli.csproj -c Release --runtime win-x64 --self-contained /p:Optimized=true -o C:/Users/your_user/engines/Lynx
  • The previous steps will generate an executable named Lynx.Cli(.exe) and a (required) settings file named appsettings.json, which are enough to run Lynx chess engine.

Features

  • Static, material evaluation

  • Static, positional evaluation

  • NegaMax [1]

  • Iterative Deepening Depth-First Search (IDDFS) [1] [2]

  • Most Valuable Victim - Least Valuable Aggressor (MVV-LVA) [1]

  • Killer heuristic [1]

  • History heuristic [1]

  • Zobrist hashing [1]

  • Triangular PV-Table [1]

  • Principal Variation Search [1]

  • Late Move Reductions [1] [2] [3]

  • Verified null-move pruning [1] [2] [3]

  • Aspiration Windows [1] [2]

  • Transposition Table [1]

  • Check extensions [1]

  • Razoring [1]

  • PEXT Bitboards [1] [2]

  • Internal Iterative Deepening [1]

Credits

Lynx development would simply not have been possible without:

I would also like to extend my gratitude to:

  • Engine Programming discord group, especially Jamie Whiting (Akimbo), Antares (Altair), Ciekce (Stormphrax), Rak (Mess), AspectOfTheNoob (Sirius), etc.

  • The community Discord around SebLague/Chess-Challenge, which allowed me to discover EP discord and to revisit the basics, this time explained by very knowledgeable developers (such as the ones above) to people without any previous chess engine programming knowledge

  • Marcel Vanthoor and his blog about how he created his engine, Rustic

  • Gedas for his texel-tuner tool

  • SF developers for their WDL_model tool

  • Andrew Grant for OpenBench

  • lichess developers for lichess-bot

  • Open source chess engines with permissive licenses. Their existence encourages knowledge sharing and really helps pushing the Chess Engine Developer community forward. Some engines are credited inside the codebase itself, where relevant

  • Countless other developers and online resources, who/which I should probably remember, but don't come to my mind right now

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).