{"id":17996950,"url":"https://github.com/jstrieb/poker-chipper","last_synced_at":"2026-03-15T10:51:49.156Z","repository":{"id":242728534,"uuid":"757515971","full_name":"jstrieb/poker-chipper","owner":"jstrieb","description":"Optimally allocate poker chips using constrained, nonlinear optimization","archived":false,"fork":false,"pushed_at":"2024-12-13T03:21:31.000Z","size":15147,"stargazers_count":173,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T03:11:17.685Z","etag":null,"topics":["constraint-programming","constraint-satisfaction-problem","optimization","poker","scip","svelte","web-application","web-assembly"],"latest_commit_sha":null,"homepage":"https://jstrieb.github.io/poker-chipper/","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jstrieb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-02-14T16:47:05.000Z","updated_at":"2025-01-06T03:04:29.000Z","dependencies_parsed_at":"2024-12-13T04:29:45.631Z","dependency_job_id":null,"html_url":"https://github.com/jstrieb/poker-chipper","commit_stats":null,"previous_names":["jstrieb/poker-chipper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fpoker-chipper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fpoker-chipper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fpoker-chipper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fpoker-chipper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstrieb","download_url":"https://codeload.github.com/jstrieb/poker-chipper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284954,"owners_count":20913704,"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":["constraint-programming","constraint-satisfaction-problem","optimization","poker","scip","svelte","web-application","web-assembly"],"created_at":"2024-10-29T21:16:22.129Z","updated_at":"2026-03-15T10:51:44.112Z","avatar_url":"https://github.com/jstrieb.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n\n\u003ca href=\"https://jstrieb.github.io/poker-chipper\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/jstrieb/poker-chipper/blob/master/public/favicon.svg?raw=true\" width=\"125\" height=\"125\" align=\"left\" /\u003e\u003c/a\u003e\n\nPoker Chipper\n\n\u003c/h1\u003e\n\n\u003ca href=\"https://jstrieb.github.io/poker-chipper\" target=\"_blank\"\u003eOptimally\nselect poker chip denominations for cash games using constrained, nonlinear\noptimization.\u003c/a\u003e\n\n# About\n\nImagine hosting a small poker game. You know how many friends will attend, how\nmany chips you have, and the buy in. How do you pick chip denominations?\n\nWithout Poker Chipper, picking chip denominations is manual and error-prone.\nYou first try to pick values that divide each other nicely and are easy to\nremember. (Alternatively, struggle to recall the values from the last time you\nplayed.) You next try to find a way to make the chosen values sum to the buy\nin. Then, you backtrack whenever there aren't enough chips for everyone, or\nwhen there are too many chips left over. Finally, you settle for a suboptimal\nchip allocation so that you can actually start playing.\n\nWith Poker Chipper, on the other hand, picking chip denominations is fast and\neasy. Input the number of players, buy in, blinds, and number of chips. After\nwaiting a moment for the mathematically optimal results, you can save them for\nnext time, or share them with others. If you want to modify the results, adjust\nthe \"advanced options,\" and the chip denominations will be recomputed\naccordingly.\n\n# How Poker Chipper Works\n\nPoker Chipper uses mixed-integer nonlinear programming (MINLP), which is a form\nof constrained, nonconvex optimization, to optimally pick poker chip\ndenominations. \n\nOptimization is performed using a \"solver\" – in this case,\n[SCIP](https://www.scipopt.org/). Some inputs to Poker Chipper are translated\ninto solver constraints, which affect what denominations are admissible. Other\ninputs influence the solver's objective function, which affects how candidate\ndenominations are evaluated, ranked, and chosen. In the user interface, inputs\naffecting constraints, and inputs affecting the objective function are\ndescribed as influencing the \"requirements\" and \"score,\" respectively, of\ncandidate solutions.\n\nPoker Chipper is a fully static web application. In other words, all of the\nprocessing involved in performing optimization occurs client-side – entirely in\nthe user's browser. The SCIP solver is designed to run natively, so Poker\nChipper bundles it for the browser by compiling SCIP to WebAssembly (WASM) with\n[Emscripten](https://emscripten.org/).\n\n## How to Read the Code\n\n### Code Table of Contents\n\nThe links below are listed in the order the code should be read to understand\nthe application from the highest to lowest level.\n\n- [`src/App.svelte`](src/App.svelte) – main high-level application\n- [`src/*.svelte`](src/) – UI components\n- [`src/solve.js`](src/solve.js) – convert user inputs to MINLP model and solve\n  using WASM SCIP\n- [`src/solveWorker.js`](src/solveWorker.js) – web worker to run solver in\n  non-blocking thread\n- [`public/serviceWorker.js`](public/serviceWorker.js) – service worker for\n  caching and offline functionality\n- [`public/*`](public/) – PWA manifest, global stylesheet, favicons, etc.\n- [`experiments/*`](experiments/) – exploration of initial concept in Python\n  (with both Z3, and later, SCIP), and Dockerfile for compiling SCIP with\n  Emscripten\n- [`src/compiled/*`](src/compiled/) – SCIP compiled to WASM via Emscripten,\n  plus associated support files\n\n### Application Architecture\n\nIn the diagram below, labeled arrows represent asynchronous fetch requests and\nmessage passing.\n\n``` mermaid\nflowchart LR\n    A[Svelte Front End] --\u003e|Solve Requests| B[\"Web Worker\n    (non-blocking thread)\"]\n    B --\u003e|Solutions| A\n    A \u003c--\u003e|Static Assets| C[Service Worker]\n    B \u003c--\u003e|Solver Static Assets| C\n    C --\u003e|Cache| C\n    C \u003c--\u003e|Static Assets| D[Web Server]\n```\n\n# Project Status \u0026 Contributing\n\nPoker Chipper is actively maintained. If there are no recent commits,\neverything is running smoothly! As of the initial release, the code is stable,\nand there are no major, outstanding features that remain to be added.\n\nBug reports and feature requests via GitHub Issues are encouraged. Pull\nrequests with more than 20 lines of code are unlikely to be merged quickly,\nunless associated with prior discussion or accompanied by substantial,\nexplanatory English prose. In other words, pull requests containing code\nwithout context may be merged after much delay, or may not be merged at all.\n\nSince Poker Chipper is a fully static web application with no server-side\nprocessing (outside of serving unchanging files), it is extremely scalable, and\nhas a very low maintenance burden. As such, even if something were to happen to\nme, and I could not continue to work on the project, the [public\nversion](https://jstrieb.github.io/poker-chipper/) should continue to remain\nfunctional and available online as long as my GitHub account is open and the\n[jstrieb.github.io](https://jstrieb.github.io) domain is active.\n\n## Support the Project\n\nThe best ways to support the project are to:\n\n- Share the project on sites like Twitter, Reddit, and Hacker News\n- Report any bugs, glitches, errors, or shortcomings that you find\n- Star the repository and follow me on GitHub\n- Host a version of the code translated into another language\n\nIf you insist on spending money to show your support, please do so in a way\nthat is widely beneficial. In particular, donations to the following\norganizations help me, in addition to the general, Internet-using public:\n\n- [Electronic Frontier Foundation](https://supporters.eff.org/donate/)\n- [The Internet Archive](https://archive.org/donate/index.php)\n- [Signal Foundation](https://signal.org/donate/)\n- [Mozilla](https://donate.mozilla.org/en-US/)\n\n# Acknowledgments \u0026 Greetz\n\nPoker Chipper would not have been possible without help and feedback from:\n\n- [Logan Snow](https://github.com/lsnow99)\n- [Amy Liu](https://www.linkedin.com/in/amyjl)\n- [Chris Cherian](https://twitter.com/chrischerian)\n- [Ani Chowdhury](https://www.linkedin.com/in/ani-chowdhury)\n- Will Hooper\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrieb%2Fpoker-chipper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstrieb%2Fpoker-chipper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrieb%2Fpoker-chipper/lists"}