[{"data":1,"prerenderedAt":414},["ShallowReactive",2],{"project-40569385":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":44,"post_text":46,"what":47,"said":86,"maker_in_thread":175,"shape":185,"grid":189,"attempts":372,"same_week":377,"maker_shows":299,"maker_hidden":406,"reader_version":407,"card":408},"40569385","Poker Chipper","Allocate poker chips optimally with mixed-integer nonlinear programming","title","Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming","https:\u002F\u002Fgithub.com\u002Fjstrieb\u002Fpoker-chipper","github.com","jstrieb",1717460977,2024,213,69,366,3515,11,"notable","games","poker chip calculator","web_app",[24,25,26,27],"poker chips","chip denominations","poker home game","mixed-integer optimization","curious",-0.079,{"positive":31,"neutral":32,"mixed":33,"critical":31},5,12,1,23,{"idea":36,"design":38,"execution":40,"performance":42,"pricing":43},{"positive":33,"critical":37},4,{"positive":39,"critical":39},0,{"positive":41,"critical":33},2,{"positive":39,"critical":39},{"positive":33,"critical":39},[33,45,45,39,45,45,45,39,33,31,45,33,33,39,39,39,45,39,39,31,45,31,45,45,39,39,39,45,31,33,39,39,39,31,39,39,39,39,39,39],3,"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.\n\nTry it out here (the submitted link goes to the GitHub repo): https:\u002F\u002Fjstrieb.github.io\u002Fpoker-chipper\u002F\n\nIt 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.\n\nI first got a CLI prototype workin",{"problem":48,"audience":54,"pricing":58,"motivation":59,"time_to_build":58,"stack":63,"openness":83,"stage":84,"team_size":85},{"value":49,"source":50,"evidence":51},"Picking chip denominations for a casual poker game takes minutes of struggling","maker",[52],{"id":53},"post",{"value":55,"source":50,"evidence":56},"Friends playing casual cash poker games",[57],{"id":53},null,{"value":60,"source":50,"evidence":61},"Automate the slow chip denomination setup for home poker games",[62],{"id":53},[64,72,76],{"value":65,"source":50,"evidence":66},"SCIP solver compiled to WebAssembly",[67,68],{"id":53},{"id":69,"by":70,"text":71},"40576073","jvanderbot","> 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…",{"value":73,"source":50,"evidence":74},"Z3 (prototype)",[75],{"id":53},{"value":77,"source":78,"evidence":79},"JavaScript","inferred",[80],{"id":81,"by":11,"text":82},"40576198","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…","open_source","launched","unknown",{"praise":87,"objections":99,"requests":132,"questions":147,"alternatives":162},[88,93],{"value":89,"source":90,"evidence":91},"Clever use of constrained optimization and WASM SCIP","commenter",[92],{"id":69,"by":70,"text":71},{"value":94,"source":50,"evidence":95},"Fast performance on phones",[96],{"id":97,"by":11,"text":98},"40576118","So far, even on underpowered Android phones I've tested on, the performance has been really good. It's more of a testament to how fast SCIP is than anything else! Specifically, I…",[100,115,126],{"value":101,"source":90,"evidence":102},"Non-standard denominations are confusing; players use standard casino colors",[103,107,111],{"id":104,"by":105,"text":106},"40577217","Raidion","Also an experienced poker player, and this is 100% correct. Ideally you want to use common casino chip colors (though these are somewhat fungible) and just shift orders of…",{"id":108,"by":109,"text":110},"40578198","ryandrake","As someone who has run many, many home games, including cash and tournaments, also consider how easy it is to stack a fresh buy-in. Having 6 of one color, 5 of another, 3 of…",{"id":112,"by":113,"text":114},"40575865","sneak","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…",{"value":116,"source":90,"evidence":117},"Optimizing for using all chips is the wrong goal; fewer chips is more playable",[118,122],{"id":119,"by":120,"text":121},"40577161","ShaggyPE","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…",{"id":123,"by":124,"text":125},"40576244","Taghkanic","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…",{"value":127,"source":90,"evidence":128},"Weird denominations slow down games",[129],{"id":130,"by":113,"text":131},"40575921","I’m saying that poker players don’t ever want to play with nonstandard denominations, even in a home game. It’s just not done. It also makes no sense: it’s confusing and slows…",[133,140],{"value":134,"source":90,"evidence":135},"Prefer fewer colours when a solution is missing",[136],{"id":137,"by":138,"text":139},"40576716","blackle","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,…",{"value":141,"source":90,"evidence":142},"Keep white as lowest-value chip",[143],{"id":144,"by":145,"text":146},"40578020","pmarreck","You should be able to pick the order of colors in terms of increasing value. White chips should always be the lowest value.",[148,155],{"value":149,"source":90,"evidence":150},"What are the optimisation criteria and what makes denominations nice",[151],{"id":152,"by":153,"text":154},"40576011","mijoharas","> 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…",{"value":156,"source":90,"evidence":157},"Why is this not a discrete optimisation problem",[158],{"id":159,"by":160,"text":161},"40583363","ponco","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",[163,168],{"value":164,"source":90,"evidence":165},"Standard casino chip colors and denominations ($1 white, $5 red, $25 green, $100 black)",[166,167],{"id":104,"by":105,"text":106},{"id":112,"by":113,"text":114},{"value":169,"source":90,"evidence":170},"Using a single chip value for all chips",[171],{"id":172,"by":173,"text":174},"40577333","annoyingnoob","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…",{"comments":176,"answered":37,"key":177},6,[178,179,182],{"id":97,"text":98},{"id":180,"text":181},"40576271","Most optimization calls on my laptop happen nearly instantaneously, whereas they can take a few seconds on average on phones. Didn't test super comprehensively. If you end up…",{"id":183,"text":184},"40576799","That's a good observation - the UI is a very thin wrapper around the optimizer. One fix would be changing the minimum number of chips per color under \"advanced options >…",{"commenters":186,"max_depth":31,"maker_replies":176,"first_comment_mins":187,"lifespan_hours":188},45,907,41,[190,192,196,198,199,203,205,209,213,216,218,221,224,226,227,230,232,234,237,238,241,245,247,249,252,255,258,261,264,267,270,273,276,280,282,283,286,288,290,292,294,297,301,303,306,308,310,312,315,319,324,326,329,330,333,336,339,342,346,348,350,353,356,358,360,362,365,367,370],[119,39,33,191,120,39],"project\u002Fcritical\u002Fidea",[193,39,39,194,195,39],"40577185","commenter\u002Fcritical\u002Fidea","audiodude",[104,39,45,197,105,39],"project\u002Fneutral\u002Fdesign",[108,39,45,197,109,39],[200,39,39,201,202,39],"40578425","commenter\u002Fneutral\u002Fnone","banannaise",[204,39,39,201,109,39],"40579834",[206,39,45,207,208,39],"40577291","project\u002Fmixed\u002Fexecution","MaxfordAndSons",[210,39,45,211,212,39],"40577470","project\u002Fneutral\u002Fexecution","Rastonbury",[214,39,45,215,202,39],"40578365","project\u002Fneutral\u002Fidea",[217,39,39,201,120,39],"40578919",[219,39,45,215,220,39],"40579351","hot_gril",[222,39,39,201,223,39],"40581033","hansvm",[225,39,39,201,220,39],"40586933",[123,33,33,191,124,39],[228,33,39,201,229,39],"40581802","eru",[69,41,31,231,70,39],"project\u002Fpositive\u002Fexecution",[97,41,39,233,11,33],"maker\u002Fneutral\u002Fperformance",[235,41,45,236,70,39],"40576208","project\u002Fneutral\u002Fperformance",[180,41,39,233,11,33],[239,45,33,191,240,39],"40578009","shmeeed",[242,45,39,243,244,39],"40580296","other\u002Fneutral\u002Fnone","cheeze",[137,37,33,246,138,39],"project\u002Fcritical\u002Fexecution",[183,37,39,248,11,33],"maker\u002Fneutral\u002Fexecution",[250,31,39,243,251,39],"40575995","opwieurposiu",[253,31,39,243,254,39],"40576071","ChadNauseam",[256,31,39,201,257,39],"40576405","gpm",[259,31,39,201,260,39],"40579489","latexr",[262,31,45,215,263,39],"40576130","contravariant",[265,31,39,266,11,33],"40579687","maker\u002Fneutral\u002Fidea",[268,31,39,243,269,39],"40576532","alex-mohr",[271,31,39,243,272,39],"40576576","dang",[274,31,39,243,275,39],"40577430","aidenn0",[277,176,31,278,279,39],"40582446","project\u002Fpositive\u002Fidea","sebra",[152,281,45,215,153,39],7,[81,281,39,266,11,33],[284,281,45,215,285,39],"40576472","ramses0",[287,281,31,231,153,39],"40577955",[172,289,45,215,173,39],8,[291,289,39,243,240,39],"40577519",[293,289,39,243,173,39],"40579628",[295,289,45,296,260,39],"40579510","project\u002Fneutral\u002Fnone",[298,299,39,243,300,39],"40575692",9,"ramon156",[159,302,39,243,160,39],10,[304,18,39,243,305,39],"40584536","Dirtkingy",[307,32,39,243,220,39],"40578620",[309,32,39,243,220,39],"40587572",[144,311,45,197,145,39],13,[313,311,39,314,11,33],"40578196","maker\u002Fneutral\u002Fdesign",[316,317,39,243,318,39],"40587812",14,"kyleblarson",[320,321,31,322,323,39],"40575798",15,"project\u002Fpositive\u002Fnone","ngruhn",[112,325,33,191,113,39],16,[327,325,39,201,328,39],"40575907","philomath_mn",[130,325,39,201,113,39],[331,325,39,201,332,39],"40576243","scarby2",[334,325,39,243,335,39],"40576567","memco",[337,325,39,201,338,39],"40575934","system33-",[340,325,39,243,341,39],"40576401","wumbo",[343,325,31,344,345,39],"40576629","project\u002Fpositive\u002Fpricing","LeifCarrotson",[347,325,39,201,113,39],"40576922",[349,325,39,201,109,39],"40579703",[351,325,39,243,352,39],"40582637","rozularen",[354,325,39,201,355,39],"40576769","HWR_14",[357,325,39,243,113,39],"40579208",[359,325,39,201,260,39],"40579706",[361,325,39,201,240,39],"40580278",[363,325,39,201,364,39],"40577472","dmurray",[366,325,39,201,124,39],"40579463",[368,325,39,201,369,39],"40580009","vikingerik",[371,325,39,201,113,39],"40583264",[373,376],{"id":374,"t":375,"points":176,"comments":41},"40465718",1716555244,{"id":4,"t":12,"points":14,"comments":15},[378,383,388,393,398,402],{"id":379,"name":380,"points":381,"category":382},"40562458","Photon",843,"hardware",{"id":384,"name":385,"points":386,"category":387},"40522844","Delve",766,"ai",{"id":389,"name":390,"points":391,"category":392},"40528045","Shade Map",685,"productivity",{"id":394,"name":395,"points":396,"category":397},"40562210","qStudio",355,"dev_tools",{"id":399,"name":400,"points":401,"category":382},"40585932","Foosbar",323,{"id":403,"name":404,"points":405,"category":20},"40582357","pn0gstr0m",309,false,"v2",{"id":409,"name":5,"line":6,"ai":406,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":410,"top":18,"kw":411,"maker":11,"domain":10,"tier":19,"attempts":41,"strip":412,"url":9,"mix":413,"praise":89,"objection":101,"sub":21},40569385,-0.08,[24,25,26,27],"1330333015311000300535330003510005000000",[31,32,33,31],1793991092963]