New top story on Hacker News: Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
17 by jstrieb | 3 comments on Hacker News.
Every time I play a casual cash poker game with friends, we spend the first several minutes struggling to figure out chip denominations. I built this to automate that process. Try it out here (the submitted link goes to the GitHub repo): https://ift.tt/KwgoLG3 It turns out that picking chip denominations optimally—such that as many chips are distributed as possible, and such that the denominations are nice—is hard (in the computational complexity sense). Upon reflection, the problem seemed to be a perfect fit for constrained optimization. I first got a CLI prototype working with Z3 (an SMT solver with optimization capabilities https://ift.tt/37ueMvY ) in Python. Then, I cross-compiled SCIP ( https://ift.tt/AQaCG5i ) to web assembly, and ported my code to use SCIP instead of Z3 so it could run in the browser. The web interface is designed to be fast and easy to use on desktop and mobile. I would love to answer questions and discuss design choices. I'm also open to feedback and bug reports. Thanks for taking a look!
17 by jstrieb | 3 comments on Hacker News.
Every time I play a casual cash poker game with friends, we spend the first several minutes struggling to figure out chip denominations. I built this to automate that process. Try it out here (the submitted link goes to the GitHub repo): https://ift.tt/KwgoLG3 It turns out that picking chip denominations optimally—such that as many chips are distributed as possible, and such that the denominations are nice—is hard (in the computational complexity sense). Upon reflection, the problem seemed to be a perfect fit for constrained optimization. I first got a CLI prototype working with Z3 (an SMT solver with optimization capabilities https://ift.tt/37ueMvY ) in Python. Then, I cross-compiled SCIP ( https://ift.tt/AQaCG5i ) to web assembly, and ported my code to use SCIP instead of Z3 so it could run in the browser. The web interface is designed to be fast and easy to use on desktop and mobile. I would love to answer questions and discuss design choices. I'm also open to feedback and bug reports. Thanks for taking a look!
Comments
Post a Comment