{"id":13479833,"url":"https://github.com/b-inary/wasm-postflop","last_synced_at":"2025-12-29T23:39:59.876Z","repository":{"id":37275548,"uuid":"454298823","full_name":"b-inary/wasm-postflop","owner":"b-inary","description":"[Development suspended] Advanced open-source Texas Hold'em GTO solver with optimized performance (web browser version)","archived":false,"fork":false,"pushed_at":"2023-10-01T13:10:48.000Z","size":4450,"stargazers_count":410,"open_issues_count":4,"forks_count":75,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-10-30T13:38:31.835Z","etag":null,"topics":["game-theory","gto","poker","solver","texas-holdem","texas-holdem-poker","webassembly"],"latest_commit_sha":null,"homepage":"https://wasm-postflop.pages.dev/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b-inary.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}},"created_at":"2022-02-01T07:36:03.000Z","updated_at":"2024-10-26T19:43:30.000Z","dependencies_parsed_at":"2023-02-13T20:47:02.214Z","dependency_job_id":"89d91ece-80f6-4a47-9f71-f073e5bd868e","html_url":"https://github.com/b-inary/wasm-postflop","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-inary%2Fwasm-postflop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-inary%2Fwasm-postflop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-inary%2Fwasm-postflop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-inary%2Fwasm-postflop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b-inary","download_url":"https://codeload.github.com/b-inary/wasm-postflop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245826716,"owners_count":20678845,"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":["game-theory","gto","poker","solver","texas-holdem","texas-holdem-poker","webassembly"],"created_at":"2024-07-31T16:02:23.662Z","updated_at":"2025-12-29T23:39:59.837Z","avatar_url":"https://github.com/b-inary.png","language":"Vue","readme":"# WASM Postflop\n\n\u003e [!IMPORTANT]\n\u003e **As of October 2023, I have started developing a poker solver as a business and have decided to suspend development of this open-source project. See [this issue] for more information.**\n\n[this issue]: https://github.com/b-inary/postflop-solver/issues/46\n\n---\n\n**WASM Postflop** is a free, open-source GTO solver for Texas hold'em poker that works on web browsers.\n\nWebsite: https://wasm-postflop.pages.dev/\n\n**Related repositories**\n- Desktop application: https://github.com/b-inary/desktop-postflop\n- Solver engine: https://github.com/b-inary/postflop-solver\n\n![Image](image.png)\n\n## Why WASM Postflop?\n\nThe GTO (Game Theory Optimal) solver has become an indispensable tool for poker research.\nHowever, unfortunately, there is a high barrier to trying out the GTO solver: the need to purchase expensive commercial software.\nThis project aims to overcome this situation by developing a free, open-source GTO solver.\n\nPlease note that this project does not intend to *replace* commercial GTO solvers.\nThey are great software, and it is not easy to create a new one that can compete with them.\nThis project intends to make the GTO solver more easily accessible to a broader audience.\n\n### Features\n\n- **Free to use**.\n  The most important feature.\n  Anyone can try out the solver for free!\n\n- **Open source**.\n  The implementation of the GTO solver is complex and is not easy to write down accurately.\n  By making the program open source, we make it possible for anyone to examine the implementation.\n\n- **Works on web browsers**.\n  This feature brings several advantages.\n  First, it allows for the solver to be easily accessible.\n  Second, it naturally makes the solver a cross-platform application.\n  Finally, it sandboxes the solver execution, so users do not have to worry about security.\n\n- **Sufficiently fast**.\n  Slow solvers are not wanted.\n  By using WebAssembly, we have reduced the performance penalty of being a web application.\n  We also supported multithreading and used a state-of-the-art algorithm ([Discounted CFR]).\n\n[Discounted CFR]: https://arxiv.org/abs/1809.04040\n\n## Comparison\n\nWe tested WASM Postflop, [Desktop Postflop] (v0.2.1), [PioSOLVER Free] (2.0.8), [GTO+] (v1.5.0), and [TexasSolver] (v0.2.0) with the \"3betpotFAST\" preset of PioSOLVER (all-in threshold is replaced with 100% in PioSOLVER).\n\n[Desktop Postflop]: https://github.com/b-inary/desktop-postflop\n[PioSOLVER Free]: https://www.piosolver.com/\n[GTO+]: https://www.gtoplus.com/\n[TexasSolver]: https://github.com/bupticybee/TexasSolver\n\n### Execution time and memory usage\n\nWe experimented on a Windows 10 PC with a Ryzen 7 3700X CPU (16 threads; PioSOLVER Free is limited to 6 threads).\nWASM Postflop was executed on Google Chrome 108.\n\nThe table below shows that Desktop Postflop, a native port of WASM Postflop, was the clear winner in terms of execution time.\nWASM Postflop was about 2x slower than Desktop Postflop, and Pio CFR and GTO+ were between them.\nIn terms of memory usage, the 16-bit integer mode of WASM Postflop and Desktop Postflop, the original Pio algorithm, and GTO+ achieved almost the same efficiency.\nTexasSolver, another free and open-source solver, suffered from slow execution times and poor memory efficiency.\n\nWe consider that 2x time overhead compared to Desktop Postflop is acceptable for casual use.\nHowever, if you do not think so, please consider trying Desktop Postflop, which is also free and open-source.\n\n(1) 32-bit FP / (2) 16-bit integer / (3) Pio CFR / (4) Original Pio algorithm\n\n- **6 threads**\n\n| Solver | WASM\u003cbr/\u003e(1) | WASM\u003cbr/\u003e(2) | Desktop\u003cbr/\u003e(1) | Desktop\u003cbr/\u003e(2) | Pio\u003cbr/\u003e(3) | Pio\u003cbr/\u003e(4) | GTO+ | Texas |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| **Time (Target: 0.5%)** | **33.4 s** | **42.2 s** | 20.0 s | *19.8 s* | 22.9 s | 30.3 s | 22.0 s | 103.5 s |\n| **Time (Target: 0.3%)** | **41.2 s** | **52.3 s** | 24.9 s | *24.7 s* | 28.2 s | 42.4 s | 31.4 s | 149.0 s |\n| **Time (Target: 0.1%)** | **71.9 s** | **92.6 s** | 44.4 s | *44.0 s* | 60.1 s | 108.4 s | 67.7 s | 285.9 s |\n| **Memory usage** | **1.25 GB** | **660 MB** | 1.27 GB | 679 MB | 1.41 GB | 634 MB | 705 MB | 2.84 GB |\n\n- **16 threads**\n\n| Solver | WASM\u003cbr/\u003e(1) | WASM\u003cbr/\u003e(2) | Desktop\u003cbr/\u003e(1) | Desktop\u003cbr/\u003e(2) | GTO+ | Texas |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| **Time (Target: 0.5%)** | **21.1 s** | **26.1 s** | 12.6 s | *12.2 s* | 13.9 s | 67.1 s |\n| **Time (Target: 0.3%)** | **26.0 s** | **32.3 s** | 15.6 s | *15.1 s* | 19.7 s | 95.9 s |\n| **Time (Target: 0.1%)** | **45.5 s** | **57.2 s** | 27.9 s | *27.0 s* | 41.7 s | 182.6 s |\n| **Memory usage** | **1.25 GB** | **660 MB** | 1.27 GB | 679 MB | 705 MB | 2.84 GB |\n\n### Results\n\nA comparison of the obtained results is as follows (target exploitability is set to 0.1%).\nWe can see that WASM Postflop, PioSOLVER, and GTO+ return nearly identical results.\n\n| WASM Postflop | PioSOLVER | GTO+ | TexasSolver |\n| --- | --- | --- | --- |\n| ![WASM Postflop results](comparison_wasm.png) | ![PioSOLVER results](comparison_pio.png) | ![GTO+ results](comparison_gtoplus.png) | ![TexasSolver results](comparison_texas.png) |\n\nSpecific values of Bet %, equity, and EV are as follows.\nTexasSolver returned a different solution, which is presumably incorrect.\nEither way, we cannot verify the correctness because we cannot see the overall EV in TexasSolver.\n\n| Solver | WASM | Pio | GTO+ | Texas |\n| :---: | :---: | :---: | :---: | :---: |\n| **Bet %** | **55.2%** | 55.19% | 55.2% | 63.0% |\n| **Equity** | **55.3%** | 55.347% | 55.35% | ? |\n| **EV** | **105.1** | 105.11 | 105.115 | ? |\n\n## Build\n\n```sh\n$ # prerequisites\n$ rustup install nightly\n$ rustup +nightly component add rust-src\n$ rustup target add wasm32-unknown-unknown\n$ cargo install wasm-pack\n$ npm install\n\n$ # build\n$ npm run wasm\n$ npm run build\n\n$ # serve\n$ npm run serve\n\n$ # lint/format\n$ npm run lint\n$ npm run format\n```\n\n## License\n\nCopyright (C) 2022 Wataru Inariba\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","funding_links":[],"categories":["Vue"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-inary%2Fwasm-postflop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb-inary%2Fwasm-postflop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-inary%2Fwasm-postflop/lists"}