Lucky Lenny Learning

Book 9: Beyond One Technique

Central question

What changes when we solve the same game with a different technique—or ask the computer to win a different way?

The Story

Imagine a computer player that can make a very careful choice. It looks at the dice, lists what might happen next, and chooses the move with the best average turn score. Is that the best player?

The question sounds simple until we ask: best at what? A player can try to earn the most points before ending its turn. It can try to win the whole game. It can follow a short list of rules. It can learn from examples. A language model can read a list of legal choices and pick one. These are different techniques, and they may have different costs.

This chapter follows one clear comparison. In the research game, an exact one-turn solver chooses moves to maximize expected points in that turn. A tournament then puts this points-focused player against R5, a hand-written rule player. The result is evidence that stronger computation can beat a hand-written rule book in this matchup. It is not evidence about language models (LLMs), and it does not make the solver a game-win-probability optimizer.

That distinction is the puzzle. If you optimize one turn at a time, you may still win many full games. But “many” is not the same as “as many as possible,” and the current comparison does not tell us whether a policy trained directly to win games would do better.

Before reading the result, make a prediction. Suppose one player chooses the action with the highest expected points this turn. Suppose another player uses rules about when to bank or roll. Which one would you expect to win more games? What evidence would change your mind?

There is another question hiding inside “best.” What if the goal itself changes? A turn-score objective asks about one turn. A win-probability objective asks whether your score will beat another player’s score over a whole game. The second question needs more context: your score, the opponent’s score, the rules for ending the game, and the choices still available. A good answer to one objective need not be a good answer to the other.

Dragnet: Just the Facts

First, name the track

The results in this chapter come from the research game, using game_mechanics and the traditional rules. Do not mix these figures with the separate classroom variant in src/farkle_ml/, which has different rules. The solver-versus-R5 experiment used two-player games with the traditional rules and a final round. Its exploratory seed block was 30000–34999, played in both seat orders. These were not the three-games practice seeds and were not its judged block.

The three-games comparison is separate. It used classroom-rules Farkle with a target of 4,000 and small practice runs on seeds 40000–40009. The common class-tournament plan reserves practice seeds 40000–40199 and judged seeds 50000–50199. These three-games results are practice only, not judged evidence, and small samples can swing sharply.

Different techniques answer different questions

A rule-based player follows instructions written by a person. R5 is one such player. Its choices can be inspected as rules, which makes it a practical baseline. It is not an exact answer to every situation.

A solver uses a mathematical model of possible outcomes. Here, the exact one-turn solver compares choices for their expected points over the current turn. “Expected” means an average over possible outcomes, weighted by how likely they are. It can be a powerful reference for that particular question.

But the word “exact” has a boundary. This solver is exact for its implemented, capped one-turn model; the repository warns that the cap can affect values near the cap. More important for this chapter, it does not optimize the chance of winning a two-player game. The full-game comparison makes a policy out of its one-turn choices, then tests that policy in games. That experiment measures how this points-oriented policy fares against R5. It does not transform the policy’s objective into game-win probability.

A learned player uses data or experience to choose actions. The repo has learned-player work, but the turn-score-versus-win question is not settled by the existence of a learner. One experiment in the three-games work used a one-turn learned bot against R5. It was trained for a turn policy, so its observed game wins do not establish that it learned a whole-game win objective.

An LLM-driven player is another approach. In the practice setup, the game supplied legal choices and a local language model selected among them. This made the model one decision component; it did not give the model control of the dice, scoring, or rules. It also had an operating cost: calls, tokens, and elapsed time were recorded. Those costs belong beside the result, not hidden behind the word “intelligent.”

What the solver-versus-R5 run found

The report describes the exact one-turn expected-points optimizer playing full games against unmodified R5. For traditional rules, it played 10,000 games, with each seed represented in both seat orders. The solver bot won 5,885 games; R5 won 4,011; there were 104 ties. Excluding ties, the solver’s win share was 59.5% of 9,896 non-tied games. A Wilson 95% interval computed from those counts is 58.5% to 60.4%. This is evidence that stronger computation can outperform a hand-written rule book in this research-game matchup. It says nothing about LLM performance: the comparison contains no LLM player.

That is evidence about this matchup, these rules, and this seed block. It says that this points-per-turn policy performed better than R5 in this experiment. It does not show that the solver maximizes full-game wins. A different opponent pool, ruleset, or objective may change the comparison.

The report also gives a Busche–Neller comparison, but that ruleset differs from traditional rules in more than one way. We do not need that second result to answer our narrow question, so we will keep the traditional result in focus rather than treating the rulesets as interchangeable. The interval above is an ordinary Wilson interval, not the paired interval printed in the source report.

The objective changes the information you need

A one-turn solver can focus on dice remaining and points collected in the turn. A win-probability solver must also represent game position. The design review describes a possible two-player value iteration over own score, opponent score, turn total, and dice. Its report says this work is not started. The report estimated that a fine state grid would be very large and called for a feasibility check before deciding whether to proceed. That is a plan and status, not a measured runtime or an implemented solver.

So the central contrast remains open. The available experiment shows a one-turn points optimizer beating R5 in full games. It does not compare that optimizer with an exact win-probability policy. No win-probability solver artifact exists in the indexed evidence. PENDING: build and verify a win-probability reference policy, then compare it with points-per-turn strategies in full games under a declared ruleset, opponent setup, and seed protocol.

The point is not that the turn-score policy is secretly bad. The evidence says it is strong against R5. The question is whether a policy built for another objective can do better—and how much it costs to find out.

Another technique, another cost

The three-games practice artifacts make the tool comparison concrete. In classroom-rules Farkle, the learned tool won 11 of 20 practice games against R5. The Wilson 95% interval is 34.2% to 74.2%. The artifact describes this as a one-turn learner, and the sample is small. It is not a final ranking.

Two local language models each won zero of 20 practice games against R5 in that setup. For each 0/20 result, the Wilson 95% interval is 0.0% to 16.1%. The Qwen run recorded 1,887 model calls and 218,368 input tokens; the Gemma run recorded 1,931 calls and 235,238 input tokens. Both also had forced moves handled in code rather than by a model call. These are practice-only observations, not evidence that LLMs cannot play Farkle well. The prompt contained no rules or strategy text, and a different prompt has not been tested here.

This is why the project records effectiveness and cost separately. Rules can be straightforward to run, a learned policy requires preparation, and an LLM decision can involve repeated calls. The available artifacts do not give a fair, complete lifetime-cost comparison across all three approaches. They show particular measured costs for particular practice runs. PENDING: a frozen, judged comparison with comparable rules, seats, prompts, and cost records for each tool.

A first attempt that went wrong

A live practice attempt asked a local language model to choose when there was only one legal move. The model returned an invalid choice, and the game was forfeited. The team recognized that a forced move is not a real decision and changed the harness to make forced moves in code, counting them separately. That is a useful design correction: before asking which technique is cleverest, check whether there is a choice to make at all.

What you can now do

You can distinguish a policy that maximizes expected points in one turn from one that maximizes the chance of winning a whole game. You can read a head-to-head result without stretching it into a claim about every opponent or objective. You can also ask what another technique costs, alongside what it accomplishes. The open question is whether a verified win-probability solver would beat the points-focused policy, and by how much.

The Scripted Journey

No new code is needed to inspect this chapter’s main comparison: the repository already has a committed summary. Read the traditional-rules row in artifacts/solver_vs_r5_v1/summary.md. Cover the results, and write down your own prediction before you uncover them. Then ask three questions: What was optimized? Who was the opponent? What would this result still fail to prove?

Now sketch a small experiment on paper. Keep the rules fixed. Compare the turn-points solver with a future win-probability solver. Decide what the outcome should be: games won, ties, and an uncertainty interval would be one reasonable set. Decide how to balance who goes first. Decide what would count as enough evidence for you to say the policies differ. Do not fill in results. That solver has not been built or tested yet.

If you want to inspect the uncertainty calculations, this Python 3 snippet computes all three Wilson 95% intervals from the committed win/loss counts: the research-game solver result, the classroom learner practice result, and either classroom LLM practice result. The two LLM runs have the same 0/20 counts, so they share one interval. Run the command from the repository root:

$ python3 - <<'PY'
from math import sqrt

def wilson_interval(wins, losses):
    n = wins + losses
    p = wins / n
    z = 1.96
    denominator = 1 + z * z / n
    center = (p + z * z / (2 * n)) / denominator
    margin = z * sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / denominator
    return max(0.0, 100 * (center - margin)), min(100.0, 100 * (center + margin))

for label, wins, losses in (
    ("Research-game solver", 5885, 4011),
    ("Classroom learner practice", 11, 9),
    ("Classroom LLM practice (each model)", 0, 20),
):
    low, high = wilson_interval(wins, losses)
    print(f"{label}: {low:.1f}%–{high:.1f}%")
PY
Research-game solver: 58.5%–60.4%
Classroom learner practice: 34.2%–74.2%
Classroom LLM practice (each model): 0.0%–16.1%

The input counts are copied from the committed artifacts cited in the evidence table. The output is a calculation from those counts; it is not a new tournament. The snippet uses only Python’s standard library and is compatible with Python 3.9.

What if the result had gone the other way? The solver might still have been correct for its stated one-turn objective, while losing this full-game matchup. That would be a reason to inspect the objective, rules, opponent, and implementation. It would not mean that one experiment had proved every simple rule better than every solver. Here, the measured result is that the solver policy won more often than R5. The next experiment needs a policy designed for game wins before we can compare those objectives directly.

When you picture “the best Farkle bot,” what do you want it to be best at: the average points earned on a turn, or the chance of winning the game? What information and computing cost would you accept to answer that question?

Evidence table

ClaimVALUECommitted source path (or reproducing command)Source commitStatus
Research-game traditional solver-versus-R5 run size, seed block and seat schedule10,000 games; seeds 30000–34999; both seat orderssidecar/reports/2026-11-20-solver-vs-r5.mdgit log -1 --format=%h -- sidecar/reports/2026-11-20-solver-vs-r5.md → 46bdc67Verified report
Research-game traditional wins, ties and non-tied solver shareSolver 5,885 wins; R5 4,011 wins; 104 ties; 59.5% = 5,885/9,896 non-tied gamesartifacts/solver_vs_r5_v1/summary.mdgit log -1 --format=%h -- artifacts/solver_vs_r5_v1/summary.md → 46bdc67Verified artifact; research game, traditional rules
Research-game traditional solver-share Wilson 95% interval58.5%–60.4%; computed from 5,885 wins and 4,011 lossesSnippet and exact python3 - <<'PY' command in The Scripted Journey; counts from artifacts/solver_vs_r5_v1/summary.md46bdc67 (counts); this branch (pin at merge), flo/ch-b9 (snippet)Computed; ordinary Wilson interval, unpaired
Solver objective and excluded game contextExact capped one-turn expected-points policy; ignores opponent score and final roundsidecar/reports/2026-11-20-solver-vs-r5.mdgit log -1 --format=%h -- sidecar/reports/2026-11-20-solver-vs-r5.md → 46bdc67Verified; not a win-probability optimum
Solver-cap caveatCap can affect values near the capcapstone/curriculum/EVIDENCE-INDEX.mdgit log -1 --format=%h -- capstone/curriculum/EVIDENCE-INDEX.md → 074b855Verified caveat
Win-probability reference statusPENDING: not started; no implemented reference policy or direct comparisonsidecar/reports/2026-11-20-solver-vs-r5.mdgit log -1 --format=%h -- sidecar/reports/2026-11-20-solver-vs-r5.md → 46bdc67PENDING: implement and verify reference policy; compare in full games
Classroom plan seed rangesPractice 40000–40199; judged 50000–50199sidecar/plans/three-games-three-tools-plan-v1.mdgit log -1 --format=%h -- sidecar/plans/three-games-three-tools-plan-v1.md → 7d55a55Verified plan; separate track from research-game result
Classroom-rules learned-player practice result11/20 wins (55.0%); Wilson 95% interval 34.2%–74.2%artifacts/three_games_v1/farkle_practice/qwen3_5_9b.md; interval computed by the exact python3 - <<'PY' command and snippet in The Scripted Journey4fe0254 (counts); this branch (pin at merge), flo/ch-b9 (snippet)Practice only; one-turn learner, not judged
Classroom-rules local LLM practice resultsQwen: 0/20 wins, 1,887 calls, 218,368 input tokens. Gemma: 0/20 wins, 1,931 calls, 235,238 input tokens. Each win-rate Wilson 95% interval: 0.0%–16.1%sidecar/plans/2026-11-25-done-enough-three-games-three-tools.md; interval computed by the exact python3 - <<'PY' command and snippet in The Scripted Journey5b59520 (counts); this branch (pin at merge), flo/ch-b9 (snippet)Practice only; prompt and setup limited
Forced-move failure and harness changeOne legal choice; invalid model response forfeited a game; forced moves moved into codesidecar/plans/2026-11-25-done-enough-three-games-three-tools.mdgit log -1 --format=%h -- sidecar/plans/2026-11-25-done-enough-three-games-three-tools.md → 5b59520Verified first attempt
Comparable judged cost-and-strength run across toolsPENDING: no completed comparable judged result in cited planning evidencesidecar/plans/three-games-three-tools-plan-v1.mdgit log -1 --format=%h -- sidecar/plans/three-games-three-tools-plan-v1.md → 7d55a55PENDING: freeze and complete comparable judged comparison