Skip to content(if available)orjump to list(if available)

Yahtzeeql – Yahtzee solver that's mostly SQL

canvascritic

This is a clever hack and a cute abuse of SQL joins to brute-force what’s essentially a 2-ply MDP over a finite space.

The core idea btw of using precomputed transition/score tables to simulate and optimize turn-by-turn play is a classical reinforcement learning method

What would be interesting here is to flip it: train a policy network (maybe tiny, 2-layer MLP) to approximate the SQL policy. then you could distill the SQL brute-force policy into something fast and differentiable.

i’d love to see a variant where the optimizer isn’t just maximizing EV, but is tuned to human psychology. e.g., people like getting Yahtzees more than getting 23 in chance. could add a utility function over scores.

Anyway this is a great repo for students to learn expected value optimization with simple mechanics.

BarryGuff

Yahtzee is 100% random luck from dice rolls. You can't "solve" it.

nkrisc

The rolls may be random, and luck is a significant factor, but the game as a whole is not 100% random luck. You still have to make decisions.

I do agree that “solve” isn’t the right word. Probably more accurate to refer to an optimal strategy.

sram1337

What do you think the link is about then?

xyst

skill issue

AStonesThrow

So I handed him my bottle,

And he drank down my last swallow

Then he bummed a cigarette,

And asked me for a light

And the night got deathly quiet

And his face lost all expression...

“If you’re gonna play the game, boy,

Gotta learn to play it right.”