{"id":17501319,"url":"https://github.com/vinc/littlewing","last_synced_at":"2025-04-06T04:12:15.960Z","repository":{"id":25060569,"uuid":"28480689","full_name":"vinc/littlewing","owner":"vinc","description":"Chess engine written in Rust ♛","archived":false,"fork":false,"pushed_at":"2024-10-08T12:14:55.000Z","size":625,"stargazers_count":42,"open_issues_count":15,"forks_count":2,"subscribers_count":6,"default_branch":"trunk","last_synced_at":"2025-03-30T03:06:55.297Z","etag":null,"topics":["bitboard-chess-engine","chess","chess-engine","rust"],"latest_commit_sha":null,"homepage":"https://vinc.cc/binaries","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2014-12-25T12:07:09.000Z","updated_at":"2025-02-26T16:06:16.000Z","dependencies_parsed_at":"2024-10-30T10:04:59.820Z","dependency_job_id":"253c7b92-3dc4-4912-979d-aa3ef1f90e6f","html_url":"https://github.com/vinc/littlewing","commit_stats":{"total_commits":516,"total_committers":4,"mean_commits":129.0,"dds":0.009689922480620172,"last_synced_commit":"8c22d5c9e2fd1d558a016507d9b76971b3ca0cb6"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinc%2Flittlewing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinc%2Flittlewing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinc%2Flittlewing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinc%2Flittlewing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinc","download_url":"https://codeload.github.com/vinc/littlewing/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430872,"owners_count":20937874,"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":["bitboard-chess-engine","chess","chess-engine","rust"],"created_at":"2024-10-19T19:44:53.358Z","updated_at":"2025-04-06T04:12:15.922Z","avatar_url":"https://github.com/vinc.png","language":"Rust","funding_links":[],"categories":["rust"],"sub_categories":[],"readme":"Little Wing: a chess engine written in Rust\n===========================================\n\n[![Travis](https://img.shields.io/travis/vinc/littlewing/master.svg)](https://travis-ci.org/vinc/littlewing/branches)\n[![Crates.io](https://img.shields.io/crates/v/littlewing.svg)](https://crates.io/crates/littlewing)\n\nLittle Wing is the successor of [Purple Haze](https://github.com/vinc/purplehaze).\n\nThe project started in December 2014 to learn the Rust language and play with\nbitboards. Both experiments were conclusive and Little Wing it is still\nmaintained in 2023.\n\nCurrently evaluated at around 2200 ELO on CCRL 40/4 Rating List.\n\n[![asciicast](https://asciinema.org/a/146112.png)](https://asciinema.org/a/146112)\n\n\nFeatures\n--------\n\n- Interfaces\n  - A nice CLI with many commands\n  - XBoard and UCI communication protocols\n  - Public API with [documented library](https://docs.rs/littlewing)\n- Board representation\n  - Bitboard with LLVM CTPOP and CTTZ\n  - Sliding piece attacks with Hyperbola Quintessence and First Rank Attacks\n  - Zobrist hashing with Xorshift RNG\n  - Staged moves generation\n  - MVV/LVA and SEE moves ordering with insertion sort\n  - FEN support\n- Search\n  - Principal variation search\n  - Quiescence search\n  - Transposition table\n  - Null move pruning\n  - Internal iterative deepening\n  - Futility pruning\n  - Late move reduction\n  - Killer heuristic\n- Evaluation\n  - Piece square table evaluation\n  - Mobility evaluation\n  - Static exchange evaluation\n\n\nInstall\n-------\n\nBinaries for GNU/Linux (x86-64), Android (ARMv7), and Windows (x86-64) are\navailable: https://vinc.cc/binaries\n\nIf you want to compile Little Wing yourself, you must first install Rust:\n\n    $ curl https://sh.rustup.rs -sSf | sh\n\nThen you can install the latest stable version of the engine with Cargo:\n\n    $ cargo install littlewing\n\nOr the development version by fetching the git repository:\n\n    $ git clone https://github.com/vinc/littlewing.git\n    $ cd littlewing\n    $ export RUSTFLAGS=\"-C target-cpu=native\"\n    $ export LITTLEWING_VERSION=\"$(git describe)\"\n    $ cargo build --release\n    $ sudo cp target/release/littlewing /usr/local/bin\n\n\nUsage\n-----\n\nLittle Wing is compatible with XBoard and UCI communication protocols,\nand in addition it has its own text-based user interface:\n\n    $ littlewing\n                                          _,;\n                   ,       .--.       _,-'.-;\n                    \\`-, \u003c) o  `._ ,-' ,'`_7\n                    \u003c_  `-\\ _       _,' _.'\n                      \u003c_`\".| `\\    `  _.\u003e\n                        \u003c_ ;   \\     _\u003e\n                         `\"     ;  ``\n      Little Wing v0.7.0    \\   |   \\\n                             '|-. _  \\\n      by Vincent Ollivier  _/ /     \\ '.\n      +---+---+---+---+---+\"-\"`---+--'\\_\u003e\n      | r | n | b | q | k | b | n | r | 8\n      +---+---+---+---+---+---+---+---+\n      | p | p | p | p | p | p | p | p | 7\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 6\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 5\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 4\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 3\n      +---+---+---+---+---+---+---+---+\n      | P | P | P | P | P | P | P | P | 2\n      +---+---+---+---+---+---+---+---+\n      | R | N | B | Q | K | B | N | R | 1\n      +---+---+---+---+---+---+---+---+\n        a   b   c   d   e   f   g   h\n\n    \u003e move e4\n\n      +---+---+---+---+---+---+---+---+\n      | r | n | b | q | k | b | n | r | 8\n      +---+---+---+---+---+---+---+---+\n      | p | p | p | p | p | p | p | p | 7\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 6\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 5\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   | P |   |   |   | 4\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 3\n      +---+---+---+---+---+---+---+---+\n      | P | P | P | P |   | P | P | P | 2\n      +---+---+---+---+---+---+---+---+\n      | R | N | B | Q | K | B | N | R | 1\n      +---+---+---+---+---+---+---+---+\n        a   b   c   d   e   f   g   h\n\n    \u003e time 1 10\n    \u003e show think\n    \u003e play black\n\n      ply  score    time      nodes  pv\n        1    -46       0          1  1. ... a6\n        1    -45       0          3  1. ... c6\n        1    -22       0          4  1. ... d6\n        1    -20       0          5  1. ... e6\n        1     -1       0         14  1. ... d5\n        1      0       0         15  1. ... e5\n        1      9       0         20  1. ... Nc6\n        2    -47       0         53  1. ... Nc6 2. Nc3\n        3      9       0        278  1. ... Nc6 2. Nc3 Nf6\n        4    -45       0        860  1. ... Nc6 2. Nc3 Nf6 3. Nf3\n        4    -31       1       2437  1. ... d5 2. exd5 Qxd5 3. Nc3\n        5    -32       1       4647  1. ... d5 2. exd5 Qxd5 3. Nc3 Qd4\n        5    -20       2       7442  1. ... d6 2. Nc3 Nf6 3. Nf3 Nc6\n        5      0       2      11381  1. ... e5 2. Nc3 Nf6 3. Nf3 Nc6\n        5      1       2      12946  1. ... Nc6 2. Nc3 Nf6 3. Nf3 d5\n        6    -21       3      14052  1. ... Nc6 2. Nc3 Nf6 3. Nf3 d5 4. d3\n        7     -7       6      34813  1. ... Nc6 2. Nf3 Nf6 3. e5 Ng4 4. d4 d5\n        8    -29       9      53113  1. ... Nc6 2. Nf3 Nf6 3. e5 Ng4 4. d4 d6\n                                     5. h3\n        9    -25      27     181431  1. ... Nc6 2. d4 d5 3. e5 e6 4. Nc3 Bb4\n                                     5. Nf3 Nge7\n        9    -12      35     241217  1. ... e5 2. Nc3 Nf6 3. Nf3 Nc6 4. d4 exd4\n                                     5. Nxd4 d5\n       10    -10      50     363028  1. ... e5 2. Nc3 Nf6 3. Nf3 Nc6 4. d4 exd4\n                                     5. Nxd4 d5 6. f3\n       11     -7     109     815399  1. ... e5 2. Nf3 Nf6 3. Nxe5 d6 4. Nc4 Nxe4\n                                     5. d3 Nf6 6. Nc3 Nc6\n       12    -23     218    1686098  1. ... e5 2. Nf3 Nf6 3. Nc3 Nc6 4. d4 exd4\n                                     5. Nxd4 d5 6. exd5 Nxd5 7. Bc4\n       13    -13     467    3791367  1. ... e5 2. Nf3 Nf6 3. Nc3 Nc6 4. d4 exd4\n                                     5. Nxd4 d5 6. exd5 Nxd5 7. Bc4\n\n    \u003c move e5\n\n      +---+---+---+---+---+---+---+---+\n      | r | n | b | q | k | b | n | r | 8\n      +---+---+---+---+---+---+---+---+\n      | p | p | p | p |   | p | p | p | 7\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 6\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   | p |   |   |   | 5\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   | P |   |   |   | 4\n      +---+---+---+---+---+---+---+---+\n      |   |   |   |   |   |   |   |   | 3\n      +---+---+---+---+---+---+---+---+\n      | P | P | P | P |   | P | P | P | 2\n      +---+---+---+---+---+---+---+---+\n      | R | N | B | Q | K | B | N | R | 1\n      +---+---+---+---+---+---+---+---+\n        a   b   c   d   e   f   g   h\n\n    \u003e help\n\n    Commands:\n\n      quit                      Exit this program\n      help                      Display this screen\n      load [\u003coptions\u003e]          Load game from \u003coptions\u003e\n      save [\u003coptions\u003e]          Save game to \u003coptions\u003e\n      hint                      Search the best move\n      play [\u003ccolor\u003e]            Search and play [\u003ccolor\u003e] move[s]\n      undo                      Undo the last move\n      move \u003cmove\u003e               Play \u003cmove\u003e on the board\n\n      show \u003cfeature\u003e            Show \u003cfeature\u003e\n      hide \u003cfeature\u003e            Hide \u003cfeature\u003e\n      time \u003cmoves\u003e \u003ctime\u003e       Set clock to \u003cmoves\u003e in \u003ctime\u003e (in seconds)\n      hash \u003csize\u003e               Set the \u003csize\u003e of the memory (in MB)\n      core \u003cnumber\u003e             Set the \u003cnumber\u003e of threads\n\n      perft [\u003cdepth\u003e]           Count the nodes at each depth\n      perftsuite \u003cepd\u003e          Compare perft results to each position of \u003cepd\u003e\n      testsuite \u003cepd\u003e [\u003ctime\u003e]  Search each position of \u003cepd\u003e [for \u003ctime\u003e]\n      divide \u003cdepth\u003e            Count the nodes at \u003cdepth\u003e for each moves\n\n      uci                       Start UCI mode\n      xboard                    Start XBoard mode\n\n    Made with \u003c3 in 2014-2023 by Vincent Ollivier \u003cv@vinc.cc\u003e\n\n    Report bugs to https://github.com/vinc/littlewing/issues\n\n    \u003e quit\n\n\nTests\n-----\n\nRun the test suite with Cargo:\n\n    $ cargo test\n\nLittle Wing also have a `perft` command for counting the number of nodes at\neach depth from the starting position.\n\n    $ cargo run -- --silent\n    \u003e perft\n    perft 1 -\u003e 20 (0.00 s, 5.83e4 nps)\n    perft 2 -\u003e 400 (0.00 s, 7.62e5 nps)\n    perft 3 -\u003e 8902 (0.01 s, 7.44e5 nps)\n    perft 4 -\u003e 197281 (0.16 s, 1.26e6 nps)\n    perft 5 -\u003e 4865609 (3.82 s, 1.27e6 nps)\n\nAnd a `perftsuite` command for comparing the results of a perft calculation\nwith the given EPD file.\n\n    $ cargo run -- --silent\n    \u003e perftsuite tests/perftsuite.epd\n    rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 -\u003e ......\n    r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1 -\u003e ......\n    4k3/8/8/8/8/8/8/4K2R w K - 0 1 -\u003e ......\n    4k3/8/8/8/8/8/8/R3K3 w Q - 0 1 -\u003e ......\n    4k2r/8/8/8/8/8/8/4K3 w k - 0 1 -\u003e ......\n    r3k3/8/8/8/8/8/8/4K3 w q - 0 1 -\u003e ......\n    4k3/8/8/8/8/8/8/R3K2R w KQ - 0 1 -\u003e ......\n    r3k2r/8/8/8/8/8/8/4K3 w kq - 0 1 -\u003e ......\n    8/8/8/8/8/8/6k1/4K2R w K - 0 1 -\u003e ......\n    8/8/8/8/8/8/1k6/R3K3 w Q - 0 1 -\u003e ......\n    4k2r/6K1/8/8/8/8/8/8 w k - 0 1 -\u003e ......\n    r3k3/1K6/8/8/8/8/8/8 w q - 0 1 -\u003e ......\n\nAnd the usual debug commands like `divide` or `testsuite`:\n\n    $ cargo run -- --silent\n    \u003e testsuite tests/wac.epd 1\n    2rr3k/pp3pp1/1nnqbN1p/3pN3/2pP4/2P3Q1/PPB4P/R4RK1 w - - bm Qg6 -\u003e Qg6\n    8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - bm Rxb2 -\u003e c3\n    5rk1/1ppb3p/p1pb4/6q1/3P1p1r/2P1R2P/PP1BQ1P1/5RKN w - - bm Rg3 -\u003e Rg3\n    r1bq2rk/pp3pbp/2p1p1pQ/7P/3P4/2PB1N2/PP3PPR/2KR4 w - - bm Qxh7+ -\u003e Qxh7+\n    5k2/6pp/p1qN4/1p1p4/3P4/2PKP2Q/PP3r2/3R4 b - - bm Qc4+ -\u003e Qc4+\n    7k/p7/1R5K/6r1/6p1/6P1/8/8 w - - bm Rb7 -\u003e Rb7\n    rnbqkb1r/pppp1ppp/8/4P3/6n1/7P/PPPNPPP1/R1BQKBNR b KQkq - bm Ne3 -\u003e Ne3\n    r4q1k/p2bR1rp/2p2Q1N/5p2/5p2/2P5/PP3PPP/R5K1 w - - bm Rf7 -\u003e Rf7\n    3q1rk1/p4pp1/2pb3p/3p4/6Pr/1PNQ4/P1PB1PP1/4RRK1 b - - bm Bh2+ -\u003e Bh2+\n    2br2k1/2q3rn/p2NppQ1/2p1P3/Pp5R/4P3/1P3PPP/3R2K1 w - - bm Rxh7 -\u003e Rxh7\n    r1b1kb1r/3q1ppp/pBp1pn2/8/Np3P2/5B2/PPP3PP/R2Q1RK1 w kq - bm Bxc6 -\u003e Bxc6\n\nHere we used `cargo run` to run the engine in debug mode, but you can invoke\nit from `littlewing` if you installed it to make it run (much) faster.\n\nThe CLI as been designed to interface nicely with other Unix tools, for example\nto test if the times from perft are stable you can do:\n\n    $ for i in $(seq 0 10); do littlewing -s \u003c\u003c\u003c \"perft 6\"; sleep 1; done\n\nAnyway, have fun with it and send me your feedback at \u003cv@vinc.cc\u003e!\n\n\nLicense\n-------\n\nLittle Wing is released under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinc%2Flittlewing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinc%2Flittlewing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinc%2Flittlewing/lists"}