{"id":22350732,"url":"https://github.com/timmoth/sapling","last_synced_at":"2025-05-12T14:49:37.129Z","repository":{"id":255568179,"uuid":"852411880","full_name":"Timmoth/Sapling","owner":"Timmoth","description":"A strong dotnet UCI Chess engine - My leaf nodes are growing","archived":false,"fork":false,"pushed_at":"2025-04-21T22:13:16.000Z","size":27313,"stargazers_count":41,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-21T23:21:00.240Z","etag":null,"topics":["chess","chess-engine","csharp","dotnet","nnue","uci"],"latest_commit_sha":null,"homepage":"https://iblunder.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Timmoth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-04T18:58:43.000Z","updated_at":"2025-04-21T22:12:54.000Z","dependencies_parsed_at":"2024-10-17T04:17:28.030Z","dependency_job_id":"27ba522c-812f-48e5-b296-0ec97a494e0d","html_url":"https://github.com/Timmoth/Sapling","commit_stats":null,"previous_names":["timmoth/iblunder","timmoth/sapling"],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FSapling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FSapling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FSapling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FSapling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Timmoth","download_url":"https://codeload.github.com/Timmoth/Sapling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253758522,"owners_count":21959609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","chess-engine","csharp","dotnet","nnue","uci"],"created_at":"2024-12-04T11:12:53.270Z","updated_at":"2025-05-12T14:49:37.114Z","avatar_url":"https://github.com/Timmoth.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n   \u003cdiv style=\"width:640;height:320\"\u003e\n       \u003cimg style=\"width: inherit\" src=\"./sapling-banner.png\"\u003e\n\u003c/div\u003e\n\u003c/p\u003e\n\n### A strong dotnet UCI Chess engine - My leaf nodes are growing\n\nPlay it here -\u003e https://iblunder.com/\n\nOr challenge it on Lichess -\u003e https://lichess.org/@/sapling-bot\n\n\n| Rating pool                                                                   | Version | ELO  |\n|-------------------------------------------------------------------------------|---------|------|\n| [CCRL 40/15](https://www.computerchess.org.uk/ccrl/4040/rating_list_all.html) | 1.1.2   | 3378 |\n| [Lichess Bullet](https://lichess.org/@/Sapling-Bot/perf/bullet)               | 1.2.2   | 2890 |\n| [Lichess Blitz](https://lichess.org/@/Sapling-Bot/perf/blitz)                 | 1.2.2   | 2786 |\n| [Lichess Rapid](https://lichess.org/@/Sapling-Bot/perf/rapid)                 | 1.2.2   | 2797 |\n| [Lichess Chess960](https://lichess.org/@/Sapling-Bot/perf/chess960)           | 1.2.2   | 2209 |\n\n| Tournament                                                                                         | Version | Result           |\n|----------------------------------------------------------------------------------------------------|---------|------------------|\n| [CCRL 112th Amateur Series Division 5](https://talkchess.com/viewtopic.php?p=969661\u0026hilit=sapling) | 1.1.8   | drawed 3rd place |\n| [Blitz Tournament 3'+2\" (48th Edition)](https://talkchess.com/viewtopic.php?t=84301\u0026hilit=sapling) | 1.2.0   | Division 4 6th place              |\n| [FRC Tournament (35th Edition)](https://talkchess.com/viewtopic.php?p=970724\u0026hilit=sapling#p970724) | 1.2.2   | TBD              |\n\n## Releases\nYou can browse all windows, linux or mac releases [here](https://github.com/Timmoth/Sapling/releases)\n\n### Latest Release [v1.2.4 21/04/2025](https://github.com/Timmoth/Sapling/releases/tag/Sapling-1.2.4)\n\n## Requirements\n- Sapling makes use of hardware intrinsics to improve performance. Currently your CPU must support: `Avx2`, `Bmi1`, `Bmi2`, `Popcnt`, `Sse`. Most modern hardware shipped after 2013 should be supported.\n- The releases come with a bundled version of the dotnet runtime, however if you want to run from source you'll need the dotnet 9 SDK installed.\n\n## Running from source\n```bash\ncd ./scripts\n\n// Windows\n./build_windows_avx256.bat\n./build_windows_avx512.bat\n\n// Linux\n./build_linux_avx256.sh\n./build_linux_avx512.sh\n\n// Osx\n./build_osx_avx256.sh\n./build_osx_avx512.sh\n```\n\n## Commands\n- `quit` : exit the program\n- `setoption name threads value 8` : sets the number of threads to use\n- `ucinewgame` : initializes a new game\n- `position startpos` : sets the engine to the starting chess position\n- `position startpos moves a2a3 a7a6` : sets the engine to the starting position then applies a set of moves\n- `position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1` : sets the engine to the position given by the fen string\n- `d` : outputs a diagram of the current position\n- `go perft 6` : Runs a pert test to a specific depth\n- `go depth 10` : Returns the best move after searching for the given depth\n- `go wtime 10000 btime 10000 winc 100 binc 100` : returns the best move after searching with the given time control\n- `go see a2a3` : [Dev] returns a the result of static exchange evaluation for a given move\n- `go eval` : [Dev] returns the static evaluation of the current position\n- `datagen` : [Dev] starts generating data in the bullet format, used when training a new NNUE network\n\n## Features\n\n\u003cdetails\u003e\n\u003cSummary\u003eGeneral\u003c/Summary\u003e\n  \n- Bitboards \n- NNUE (768 -\u003e 1024)x2 -\u003e 8\n- Horizontal mirroring\n- Output buckets x8\n- Transposition table\n- Lazy SMP\n- Pondering\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003cSummary\u003eSearch\u003c/Summary\u003e\n  \n- Negamax\n- Quiescence\n- Alpha-Beta pruning\n- Iterative Deepening\n- Asperation windows\n- Null move pruning\n- Late Move Pruning\n- Futility Pruning\n- Razoring\n- Principal Variation Search\n- Check extensions\n- Internal Iterative Reduction\n- Late Move Reductions\n- Cuckoo filter repetition detection\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003cSummary\u003eMove generation / ordering\u003c/Summary\u003e\n\n- Pseudo-legal movegen\n- Static exchange evaluation\n- Killer move heuristic\n- Counter move heuristic\n- History heuristic with malus\n- Incremental sorting\n- Magic bitboards\n- PEXT bitboards\n\u003c/details\u003e\n\n## SPRT\nAfter any changes to the engine a SPRT test must be ran to ensure that the changes have a positive effect.\n\nThere is a script `sprt.bat` which contains the command to run a cutechess-cli SPRT test. Ensure that you've configured CuteChess to point to both `dev` and `base` engines before hand, and also update the opening book + endgame table base to point to one on your system.\n\n## NNUE\nI'm in the process of training a (768x8-\u003e1024)x2-8 network starting from random weights using self play data generation and bullet trainer. Expect the engine to get much stronger as I improve the network. Check [here](https://github.com/Timmoth/Sapling/tree/main/Sapling.Engine/Resources/WeightsHistory) to see the sequence of networks starting from scratch and the training logs.\n\n## Resources:\n- [Chess Programming Wiki](https://www.chessprogramming.org/)\n- [Talk Chess Forum](https://talkchess.com/)\n- [Coding Adventure](https://www.youtube.com/watch?v=U4ogK0MIzqk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmoth%2Fsapling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimmoth%2Fsapling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmoth%2Fsapling/lists"}