{"id":28901332,"url":"https://github.com/bloomberg/game-trees","last_synced_at":"2025-08-23T12:33:58.354Z","repository":{"id":292024950,"uuid":"978990908","full_name":"bloomberg/game-trees","owner":"bloomberg","description":"Functions and proofs about game trees in Rocq, implemented as rose trees.","archived":false,"fork":false,"pushed_at":"2025-05-07T21:36:43.000Z","size":22,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-26T13:41:45.237Z","etag":null,"topics":["anamorphism","game-theory","game-trees","rose-trees"],"latest_commit_sha":null,"homepage":"","language":"Coq","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/bloomberg.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":"2025-05-06T20:28:00.000Z","updated_at":"2025-05-11T04:11:03.000Z","dependencies_parsed_at":"2025-05-07T19:24:02.986Z","dependency_job_id":"35623663-30fa-4b1e-a65e-916aa54b8a01","html_url":"https://github.com/bloomberg/game-trees","commit_stats":null,"previous_names":["bloomberg/game-trees"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bloomberg/game-trees","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgame-trees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgame-trees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgame-trees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgame-trees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloomberg","download_url":"https://codeload.github.com/bloomberg/game-trees/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgame-trees/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271747022,"owners_count":24813604,"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-23T02:00:09.327Z","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":["anamorphism","game-theory","game-trees","rose-trees"],"created_at":"2025-06-21T10:09:08.662Z","updated_at":"2025-08-23T12:33:58.328Z","avatar_url":"https://github.com/bloomberg.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"# game-trees\n\n## Menu\n\n- [Rationale](#rationale)\n- [Quick start](#quick-start)\n- [Building](#building)\n- [Installation](#installation)\n- [Contributions](#contributions)\n- [License](#license)\n- [Code of Conduct](#code-of-conduct)\n\n## Rationale\n\nThis repository contains functions and proofs about game trees in [Rocq](https://rocq-prover.org/), implemented as [rose trees](https://en.wikipedia.org/wiki/Rose_tree). We provide two different flavors of game trees, inductive and coinductive game trees. Inductive game trees are finite by construction, but it is difficult to populate a tree from an initial value and a function that gives the next steps. We have to prove that the population (anamorphism or unfolding of a rose tree) terminates. Coinductive game trees can be infinite or finite. Populating a coinductive tree is easy since we do not have to prove termination, but we need bisimulation to reason about them.\n\n## Quick start\n\nIn `GameTrees.Trees.Unfold`, we provide an `unfold_tree` function that populates an inductive tree in a provably terminating way, if you abide by certain restrictions about what the `next` function says the next steps will be. We prove that this function is *sound* and *complete*: a value is in the game tree if and only if there is a sequence of applications of `next` from the initial state that create that value.\n\nIn `GameTrees.Cotrees.Unfold`, we provide an `unfold_cotree` function that populates a possibly infinite tree. We prove that this function is also *sound* and *complete*.\n\nTo showcase our library, we provide an example: a tic-tac-toe game for which we unfold a proven-complete game tree and run minimax algorithm to implement an unbeatable AI.\n\n## Building\n\nYou have to have the `rocq-released` registry of `opam`. You can obtain it by running `opam repo add rocq-released https://rocq-prover.org/opam/released` if you do not already have it.\n\nTo install the dependencies, run `opam install . --deps-only`. The project builds with Rocq 9.0.0 or higher.\n\nTo build the project use `make`. After that, you can optionally run the tic-tac-toe game with `make run`.\n\n## Installation\n\nTo install the project use `opam install .`. You do not need the `make` step from the build instructions for this.\n\n## Contributions\n\nWe :heart: contributions.\n\nHave you had a good experience with this project? Why not share some love and contribute code, or just let us know about any issues you had with it?\n\nWe welcome issue reports [here](../../issues); be sure to choose the proper issue template for your issue, so that we can be sure you're providing the necessary information.\n\nBefore sending a [Pull Request](../../pulls), please make sure you read our\n[Contribution Guidelines](https://github.com/bloomberg/.github/blob/master/CONTRIBUTING.md).\n\n## License\n\nPlease read the [LICENSE](LICENSE) file.\n\n## Code of Conduct\n\nThis project has adopted a [Code of Conduct](https://github.com/bloomberg/.github/blob/master/CODE_OF_CONDUCT.md).\nIf you have any concerns about the Code, or behavior which you have experienced in the project, please\ncontact us at opensource@bloomberg.net.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fgame-trees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloomberg%2Fgame-trees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fgame-trees/lists"}