Lucky Lenny Learning

Tools for the Job: a Farkle worksheet (DRAFT for Jeremy)

Not graded. Nothing you write here is collected or scored. You do not build the whole system. We built the tools; you play with them, predict, compare, change one small thing and tell us what surprised you. Use a nickname, never your real name.

The big idea: understand your problem before you pick a tool. A fast script is often the smartest answer. A bigger, smarter, slower tool is sometimes worth it. Your job this week is to learn to tell which situation you are in.

Before you run anything: predict (5 min)

Write a guess for each. You will check them. Guessing first is the point.

  1. A game where every roll is forced and you never choose anything (think: roll, add, repeat). Will a smarter player win more often than a random one? Why or why not?
  2. In Farkle, which will win more often against the rule-book bot R5: bank at 300, bank at 1,000, or a bot that learned from practice turns?
  3. A language model chooses Farkle moves one at a time. Compared with a plain script, how much slower will it be: 2x, 100x, 5,000x?

Part A: take the tour (10 min)

cd student_kit
py -3 tool_tour.py

It plays each tool against R5 and prints a table. Copy it here.

ToolGames per secondWin rate vs R5Forced moves (%)
R5 (rule book)
bank at 300
bank at 1,000
learned bot

Part B: fill in the blank (20 min)

Open my_bot.py. There is one function:

def my_rule(state):
    # state has: turn_score, dice_remaining, total_score, target_score, opponent_score
    # return "roll" or "bank"
    return "bank" if state["turn_score"] >= 300 else "roll"
  1. Finish the sentence: "I bank when ..."
  2. Write it as code. Run py -3 compare.py. Your rule plays R5 on 100 games (both seats).
  3. Result: wins __ losses ; games per second __
  4. Change one thing (a number, or add a second condition, such as dice left or how far behind you are). Run again. What changed?
  5. Run it again with a different seed: py -3 compare.py --seed-start 40100. Same matchup, different seed, different answer. How different? What does that tell you about a single run?

If you want more: use opponent_score; or find a spot where your rule and R5 disagree and decide who is right.

Part C: read the recorded data (10 min)

We also ran two language models (on a lab computer, because they need special hardware you do not have) and the learned bot against R5. The numbers are in recorded_llm_practice.json and tool_tour.py prints them. They are practice runs with small samples and a plain prompt, not a verdict on language models.

ToolWins of 20Model callsTime
Learned bot
qwen3.5:9b (local model)
gemma3:12b (local model)

Part D: choose the tool (15 min)

For each problem, pick one: plain script, learned model, or large language model. Say why in a sentence. There is no single right answer; reasons matter.

ProblemYour pickWhy
Add up the dice in a forced-move game
Choose bank or roll in Farkle
Play checkers well
Decide whether an opponent is bluffing in a dice game
Summarize a long, messy document

Then answer: When is it right to buy the bigger model and run it longer? And when is it wasteful?

Part E: repeat what we did, then ask

The local exercise recipe (tool tour and comparison) is in README_START.txt. Pick one thing you would try next and write it down:

Questions I have:

What surprised me: