Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming

  • You've solved the problem with an incorrect assumption. You have assumed that the ideal situation is to use all of the chips in your collection. A better solution is to ask, what is the most playable breakdown for the poker games I am playing. If I am playing 25c/50c no limit hold'em with 8 players... and a typical buy-in of $20 per player... as an experienced poker host at these limits, I maintain that the ideal breakdown is: 12x 25c 12x $1 1x $5

    If you have a set with 100x of white, blue, red, green, etc... your total number of chips used for 8 players is: 96x white (25c) 96x blue ($1) 8x red ($5)

    If players lose all of their chips... they can re-buy with $5 (red) chips and make change from the players that have all of the lower denomination chips.

    What I have proposed above is a proper solution if you want to play poker.

  • This is bonkers. No need to overthink it.

    FWIW, I belong to a forum comprised mostly of game hosts who collect playable sets for their games. This group has gotten optimal breakdowns for various games (from 5¢/10¢ up to nosebleed stakes) down to a science, through actual hosting experience. The collective number of hours hosted by these members is astronomical.

    A standard notion is that you rarely need more than 4-6 denoms for most games, with really only 3 of those in any quantity of 100 or more for a one-table cash game.

    Also, that the jump between chip denominations functionally should be 4-5x the next lowest denom.

    So for example, a typical cash set meant to work for games ranging from 50¢/$1, $1/$2, and $2/$5 could make do with denoms of 50/1/5/25/100.

    For any given stakes, there is a “workhorse” denomination, and that’s the chip type you need the most of (e.g. $5 chips on 1/2 games).

    The only real divide among this group is those who like to use the fewest possible chips which is still comfortable, without change having to be made too often, vs. those who think poker is more fun with lots and lots of chips on the table, even if many are unnecessary.

    The idea of assigning non-denoms (i.e. chips with no value printed on them) all sorts of unstandard but “optimal” amounts is I suppose an interesting intellectual exercise, but in practice seems nuts.

    … Especially considering that chips are typically sold with existing amounts printed on them. To host with non-standard denoms requires undenominated chips used with some sort of printed or displayed key to remind players of the weird values.

  • > The SCIP solver is designed to run natively, so Poker Chipper bundles it for the browser by compiling SCIP to WebAssembly (WASM)

    This is amazing. I wanted to do something similar for a web-based optimization. I ended up just putting a C++ Lambda up to serve the requests.

    I wonder how the performance compares? I feel like optimization frameworks make use of a lot of CPU-based heuristics.

  • This is nicely made, but as other people have pointed out, it appears to be optimizing in a kind of weird way for a real poker game.

    It seems to me that the underlying problem is that cheap pre-mixed chip cases usually have terrible denominations (if printed) and/or too few of each (sometimes only 50), which just doesn't make any sense. Nobody ever needs denominations that differ by a factor of 2, and you need way more than 50 of any one type to play with more than 6 people.

    For our 0.05/0.1 10$ cash games with 8-10 people, one day about 15 years ago we just went and filled a 500 chip case with nice ceramics (Old Havana Poker Club, they're still around): 150x 5 200x 25 120x 100 30x 500 (just for good measure)

    Obviously we take the numbers printed on the chips to be cents. This system has worked perfectly ever since and still offers sufficient flexibility for the occasional tournament; I can only recommend solving the problem this way once and for all. (Of course you need to adjust for the kind of game you play.)

  • I've noticed that adding a colour can make it go from having a solution to not having a solution. Maybe it should try to come up with a solution using fewer colours in that case, since it's not obvious that manually removing a colour will lead to a solution.

  • Sometimes when I am at the gym I wonder if there could be a better set of weight denominations.

    I feel like 1,3,9,27,81 could be an optimal set; but I am not sure how to prove it.

  • Nice one! Had this problem last time we ran a tournament.

    I also did some constraint programming to solve my poker problems. We play mostly cash games so I did a MiniZinc model for computing the least amount of transactions after the game: https://github.com/SRautila/poker-home-game-calculator

  • > such that as many chips are distributed as possible, and such that the denominations are nice

    Could you expand on what the optimisation criteria are? you want each person to have the maximum number of chips for some set of "nice" denominations where the total number of chips and players are constrained?

    What does a "nice" set of denominations mean in this case? Why do you want to distribute a maximal number of chips?

  • In friendly poker games that I play we just make all the chips have the same value. We do a $40 buy in and you get 50 chips, each worth 80 cents. Since all of the chips have the same value we just mix all of the colors together. No one ever has to think about how the chips break down.

  • We had this problem last weekend haha, very cool that someone made a tool!

  • Can anyone explain why this isn’t a discrete optimisation problem? I don’t understand what aspects of problem would require a non convex approach

  • Would this also help new poker dealers with starting and doing games with tips and tricks that help them become a better poker dealer or is this purily for the price and buy ins of Poker games

  • There was a time I tried to convince everyone we should use powers of 2 as chip denominations, partially because that made it easy to handle blinds doubling. In hindsight, not a good idea.

  • You should be able to pick the order of colors in terms of increasing value. White chips should always be the lowest value.

  • Is there an old man coffee variable?

  • Very cool

  • As a professional poker player, using weirdo denominations for cash games is not something anyone ever wants.

    The denominations are $1, $5, $25, $100, or $5, $25, $100, $500, or $5, $25, $100, $1000.

    In Vegas, the $5s are almost always red, the $25s are almost always green, and the $100s are almost always black.

    Even the $10 chips in use for the 5/10 games at the Wynn and Resorts World throw off a lot of players.

    Casinos frequently have $2 chips simply because it makes dropping the rake take less volume and allows them to change the boxes less frequently. You don’t need them in a home game.

    This might be an interesting math problem, but let’s not pretend that it has any applications in actual poker games.