Ask HN: Gin rummy strategies

18 points | by bix6 11 hours ago

3 comments

  • aidenn0 1 hour ago
    A bot that will minimize the expected number of (not yet seen) cards to draw to complete the hand the hand does reasonably well at deciding which card to draw or discard. The number of potential melds in a hand is small enough for modern hardware to completely enumerate, and you start the game with only 42 possible cards in the draw pile, with the number going down almost every turn, so the calculation is very feasible.

    For knocking, a heuristic for how many turns vs. amount of deadwood (which should vary based on the undercut bonus you use) does "okay"; adding a bit of randomness should be done to prevent stronger players from being able to place a lower-bounds on your count may be a good idea.

  • pschw 2 hours ago
    See if you can find a copy of Michael Sall's book, it's pricey but it's the definitive guide to the game
  • SkiFreeWin3 1 hour ago
    the biggest lever is discard strategy. medium and hard bots should track which cards you pick up from the discard pile and avoid feeding cards near those ranks or suits, while dumping high-value deadwood early. they should also judge each draw by how much deadwood it actually removes, and whether it sets up a knock, instead of just counting current melds. the hard bot can guess your hand from your pickups and discards to play defensively. if they're still losing to easy, the bug is probably in the scoring function itself. have it log win-rate per rule so you can see which one is dragging it down.