3 ms·
The first constraints are the required ones: - The sum of (color value * color quantity) for all colors must equal the buy-in - For each color, (color
by jstrieb 2y ago
The first constraints are the required ones:
- The sum of (color value * color quantity) for all colors must equal the buy-in
- For each color, (color quantity * number of players) must be less than the total number of chips of that color
Theoretically any combination adhering to these constraints would be valid, but it wouldn't necessarily be "nice." The main idea behind the "niceness" constraints are to choose denominations that are easy to remember and easy to work with. To that end, there are a number of requirements and soft constraints that nudge the optimizer towards better denominations if it can. For example, a few are:
- One chip value should be the small blind, and try to minimize the number of chips required to make the big blind
- Chip values should try to be multiples of a set number ($0.25 by default, tunable in the UI)
- Chips above $1 should be multiples of $1
- Chip values should try and be multiples of smaller chip values so that change can be made in as many ways as possible
- Distribute as many chips as possible so that people have big stacks to play with
The code for all of the constraints is here, and is commented in English for readability:
https://github.com/jstrieb/poker-chipper/blob/fab41bbe8821d0c49d074716271727564c1457f1/src/solve.js#L82 https://github.com/jstrieb/poker-chipper/blob/fab41bbe8821d0...
- ramses0 2y agoThis project is great, but I'm by far not a poker nerd and seems like the answer would be something like "print out a few tables of common options / player-counts, and just pick the closest". Something like a dive-table planner (which is actually really cool if you know how to read it!): https://www.baliocean.com/blog/what-is-a-dive-table/ https://www.baliocean.com/blog/what-is-a-dive-table/ http://www.scubadiverinfo.com/images/Dive_tables_NAUI.jpg http://www.scubadiverinfo.com/images/Dive_tables_NAUI.jpg
- mijoharas 2y agoThanks for the explanation, and the reference to the code. It is indeed nice and easy to read the constraints. Nice work!