{"id":24635082,"url":"https://github.com/desty2k/kalaha","last_synced_at":"2026-05-03T22:32:01.984Z","repository":{"id":117525608,"uuid":"449344057","full_name":"desty2k/Kalaha","owner":"desty2k","description":"Kalaha game written in Python, PyQt and C++","archived":false,"fork":false,"pushed_at":"2023-04-24T16:26:37.000Z","size":516,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T07:48:27.581Z","etag":null,"topics":["alpha-beta-pruning","cpp","iterative-deepening-search","kalaha","minimax","pyqt5","python","qrainbowstyle","qtpy","qtpynetwork"],"latest_commit_sha":null,"homepage":"","language":"Python","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/desty2k.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":"2022-01-18T15:39:57.000Z","updated_at":"2025-03-11T17:08:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"f718be2e-e91e-4bca-bf54-2f707e7e25bf","html_url":"https://github.com/desty2k/Kalaha","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/desty2k/Kalaha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FKalaha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FKalaha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FKalaha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FKalaha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desty2k","download_url":"https://codeload.github.com/desty2k/Kalaha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FKalaha/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903014,"owners_count":26065786,"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-10-08T02:00:06.501Z","response_time":56,"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":["alpha-beta-pruning","cpp","iterative-deepening-search","kalaha","minimax","pyqt5","python","qrainbowstyle","qtpy","qtpynetwork"],"created_at":"2025-01-25T09:14:21.596Z","updated_at":"2025-10-08T06:40:34.404Z","avatar_url":"https://github.com/desty2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kalaha\n\n![Game window](images/image-1.jpg)\n\n## Installation\nThis game requires additional Python libraries. Install them using `pip` command.\n```\npip install -r requirements.txt\n```\n\n## Using C++ extensions\nTo speed up best move search CMiniMax algorithm has been written in C++.\nBuild them by using following command.\n```shell\npython setup.py build\n```\nRead more about using C++ in Python code [here](https://docs.python.org/3/extending/extending.html).\n\n\n## Running server\n\n### From source\n\nUse `server` argument to start the server. By running following command \nserver will listen for connections on `127.0.0.1:20202` with turn timeout of `60` seconds.\n```shell\npython -m kalaha server -H 127.0.0.1 -p 20202 -tt 60\n```\n### Using Docker\nUpdate environment variables in `docker-compose.yml` file and spin up containers.\n```shell\ndocker-compose up\n```\n\n## Running client\n\n### Human player\n\nStart client and connect with server IP address and port autofilled.\n```shell\npython -m kalaha client -H 127.0.0.1 -p 20202\n```\n\n### Auto player\n\nAuto player can be configured via in-game GUI or command arguments. __Note: You will not be able to make moves manually.__\n\nStart client, connect to server and enable autoplay.\nThis command configures minimax algorithm to search for best move in tree of depth `4`.\nDelay of auto move will be `5` seconds.\n```shell\npython -m kalaha client -ap -apd 5 -md 4\n```\nYou can enable alpha-beta pruning by passing `-ab` argument.\n```shell\npython -m kalaha client -ap -apd 5 -md 4 -ab\n```\nYou can enable iterative deepening by passing `-id` argument.\n```shell\npython -m kalaha client -ap -apd 5 -md 4 -id\n```\nTo enable move highlighting, pass `-hm` argument.\n```shell\npython -m kalaha client -hm -md 4\n```\n\n## FAQ\n\n### What game modes are available?\nHuman vs. Human, Human vs. Auto player, Auto player vs. Auto player.\n\n### Is input validation done on the server side or client side?\nEvery move including pit selection is validated on the server side.\n\n### How auto game works?\nAutoplayer uses minimax algorithm to find the best move. Optimalizations were made to improve the performance\nand win rate.\n- iterative deepening\n- alpha-beta pruning\n- tree is generated level by level when minimax traverses the tree\n- auto player is written in C++\n\n__Important__: Algorithm is run on client side. It is running in separate thread, \nbut setting high tree depth can cause the client to freeze and exceed the player's time limit.\nRecommended tree depth is `4`.\n\n### What Python libraries are used?\n- qtpy - abstraction layer for PyQt5/PySide2\n- PyQt5 - Qt5 bindings for Python\n- [qrainbowstyle](https://github.com/desty2k/QRainbowStyleSheet) - custom windows and widgets style\n- [QtPyNetwork](https://github.com/desty2k/QtPyNetwork) - high level network library\n- coloredlogs - colored logging\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesty2k%2Fkalaha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesty2k%2Fkalaha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesty2k%2Fkalaha/lists"}