{"id":22707135,"url":"https://github.com/cair/hex-ai","last_synced_at":"2025-08-21T01:11:20.192Z","repository":{"id":52776971,"uuid":"209273454","full_name":"cair/hex-ai","owner":"cair","description":"Various AIs for the board game hex, including Monte Carlo Tree Search with the Tsetlin Machine","archived":false,"fork":false,"pushed_at":"2021-07-26T20:03:12.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T20:44:58.419Z","etag":null,"topics":["ai","hex","machine-learning","monte-carlo-tree-search","tsetlin-machine"],"latest_commit_sha":null,"homepage":"","language":"C","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/cair.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":"2019-09-18T09:46:06.000Z","updated_at":"2021-07-26T20:03:14.000Z","dependencies_parsed_at":"2022-08-22T06:00:34.711Z","dependency_job_id":null,"html_url":"https://github.com/cair/hex-ai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cair/hex-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2Fhex-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2Fhex-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2Fhex-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2Fhex-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cair","download_url":"https://codeload.github.com/cair/hex-ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2Fhex-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271411357,"owners_count":24754916,"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-20T02:00:09.606Z","response_time":69,"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":["ai","hex","machine-learning","monte-carlo-tree-search","tsetlin-machine"],"created_at":"2024-12-10T10:11:35.407Z","updated_at":"2025-08-21T01:11:20.150Z","avatar_url":"https://github.com/cair.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hex-ai\nVarious AIs for the board game hex, including Monte Carlo Tree Search with the Tsetlin Machine \n\n## Install\n`pip install git+https://github.com/cair/hex-ai.git`\n## Example\n```python\nfrom PyHex import Hex11 as Hex\n\nif __name__ == \"__main__\":\n    hg = Hex.HexGame()\n    winner = -1\n\n    for game in range(10000000):\n        Hex.init(hg)\n\n        player = 0\n\n        while Hex.full_board(hg) == 0:\n            position = Hex.place_piece_randomly(hg, player)\n\n            if Hex.winner(hg, player, position):\n                winner = player\n                break\n\n            player = 1 - player\n\n        if hg.number_of_open_positions \u003e= 75:\n            print(\"\\nPlayer %s wins!\\n\\n\" % (winner, ))\n            Hex.print(hg)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcair%2Fhex-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcair%2Fhex-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcair%2Fhex-ai/lists"}