{"id":30194057,"url":"https://github.com/mlagerberg/bitchess","last_synced_at":"2025-08-13T02:09:15.173Z","repository":{"id":19082004,"uuid":"22309523","full_name":"mlagerberg/BitChess","owner":"mlagerberg","description":"A basic chess engine written in C","archived":false,"fork":false,"pushed_at":"2022-11-23T11:24:25.000Z","size":262,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-24T11:11:20.280Z","etag":null,"topics":["c","chess"],"latest_commit_sha":null,"homepage":"","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/mlagerberg.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}},"created_at":"2014-07-27T11:37:32.000Z","updated_at":"2022-06-21T18:26:23.000Z","dependencies_parsed_at":"2023-01-11T20:30:42.227Z","dependency_job_id":null,"html_url":"https://github.com/mlagerberg/BitChess","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/mlagerberg/BitChess","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlagerberg%2FBitChess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlagerberg%2FBitChess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlagerberg%2FBitChess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlagerberg%2FBitChess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlagerberg","download_url":"https://codeload.github.com/mlagerberg/BitChess/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlagerberg%2FBitChess/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270166108,"owners_count":24538445,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","chess"],"created_at":"2025-08-13T02:09:09.640Z","updated_at":"2025-08-13T02:09:15.075Z","avatar_url":"https://github.com/mlagerberg.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"BitChess\n===========================\n\n\nBitChess is a (very simple) command-line chess engine written in C.\n\nIt is pretty much feature-complete (I think), relatively smart, and not all too slow. It's name is inspired by all the software that starts with 'bit' nowadays (Bitcoin, Bitbucket, Bit.ly, BIT.TRIP RUNNER) and should be pronounced as 'bitches'. Players of the game are to be referred to as '*playa's*'.\n\n[![Build Status](https://travis-ci.org/mlagerberg/BitChess.svg?branch=master)](https://travis-ci.org/mlagerberg/BitChess)\n\n## Screenshots\n\nStarting a new game and making a first move:\n\n![Starting a game. Virtual coin toss decides who plays white.](http://i.imgur.com/7mLKXNN.gif)\n\nAnd here is a screenshot of it running on a Raspberry Pi:\n![Making a move](https://i.imgur.com/epdcOpj.png)\n\n\n## The chess engine\n\nYou can run the chess engine through the command line, like so:\n\n\t\tusage:       chess [-s,-m,-x] \u003ccommand\u003e\n\t\tcommands and options:\n\t\t \u003cmove\u003e       Make a move in an ongoing game. The computer player will respond\n\t\t\t\t\t  with a move. The move should be in a algebraic notation like so:\n\t\t\t\t\t  'Ndxe5+' (no quotes). If the move is a pawn promotion, an extra\n\t\t\t\t\t  capital letter must denote what piece to promote to, e.g: e8=Q.\n\t\t\t\t\t  Castling can be performed by 'O-O' or 'O-O-O' (capital 'oh', not\n\t\t\t\t\t  zeros).\n\t\t new          Starts a new game, where a virtual coin toss determines who plays \n\t\t\t\t\t  white. The game files are stored in ~/.Bitchess/\n\t\t print        Shows the current board position.\n\t\t reset        Restarts an ongoing game.\n\t\t switch       Switches sides in an ongoing game. The computer player will make a\n\t\t \t\t\t  move.\n\t\t backup \u003cn\u003e   Backs up the current game to a file with the specified number \u003cn\u003e.\n\t\t \t\t\t  Can be restored using the restore command.\n\t\t restore \u003cn\u003e  Restores a backed-up game from the file with the given number \u003cn\u003e.\n\t\t \t\t\t  Requires a \u003cn\u003e.game file to be present.\n\t\t-s            Silences output to only critical messages, such as moves.\n\t\t-m            Uses simple move notation. When used, moves must be written like\n\t            \t  so: 'd7-d5'. No marks for pieces, captures or check are used.\n\t            \t  For pawn promotions, append an extra capital letter: 'e7-e4Q'.\n\t            \t  Automatically also enables silent mode, i.e.: -s.\n\t\t-x            Performs the move without having the AI player do a counter move.\n\t\t-h --help     Shows this help message.\n\t\t-v --version  Shows the application version.\n\n\n\n## Status of the project\n\nI'd say 98% finished regarding game correctness. The following should be added for it to allow an actual, rules-are-rules, game of chess:\n\n- allow the user to declare a draw,\n- respect the 50-move rule,\n- respect a chess clock.\n\nFor performance, I'd really like to see the following added as well:\n- improve alpha-beta pruning to not only cut off the search in the current chunk, but in other chunks as well (the set of possible moves is split into a few chunks which are searched and evaluated in parallel)\n- use a opening book at the start,\n- use end-game tables or otherwise improve the end game (it is *terrible* at the moment),\n- improve and add unit tests.\n\n\n## Building\n\nAssuming you have the gcc build tools installed[1]. Note that that the Windows version isn't tested as often as the Linux version, and doesn't support multi-threading.\n\nTo build on Linux, OS X or Windows, simply run:\n\n\tmake\n\nTo build a verbose debug version and run some very basic unit tests:\n\n\tmake debug test\n\nTo build and install to `/usr/local/bin`:\n\n\tmake install\n\n[1]: On Linux: `sudo apt-get install gcc make`, on Windows: http://www.mingw.org/, on Mac: install XCode.\n\n\n## Why this project?\n\nI'm aware that there are plenty of open source chess engines available that are much, much better than I'll ever be able to create. However, creating my own chess engine is something I've been wanting to do for a long time.\n\nThis project is solely meant as a hobby project for myself, and might therefore contain some questionable design choices that would not have been made if it was targeted towards the general public. This does not mean that I'm the only one to ever find use for this project, though I'm willing to take that risk.\n\n\n## Licenses\n\nThis project is released under the Apache License 2.0 (included).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlagerberg%2Fbitchess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlagerberg%2Fbitchess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlagerberg%2Fbitchess/lists"}