# How we made the Pick the Bag levels Pick the Bag teaches the idea of probability ("more likely") to children in Class 2–4 without numbers. Each level shows two or three bags of coloured balls; the child picks the bag most likely to give a ball of the target colour. ## 1. Concept We start from the idea a child should feel, ordered into five tiers: 1. **Certain vs unlikely**: one bag is almost all the target colour. 2. **Proportion beats count**: the bag with *more* target balls is not always the best; the other balls matter too. 3. **Three bags**: compare more than two choices at once. 4. **How much more likely**: one bag gives the colour exactly two, three or four times as often. 5. **Mixed challenges**: bags with many colours; compare one colour against all the rest. ## 2. Claude wrote the levels (once, ahead of time) In a working session, Claude (Anthropic) designed all 60 levels (12 per tier): every bag, every target colour, the concept each level teaches, and a short kid-friendly hint in **English and Hindi**. They are written out in [`tools/make_levels.py`](../tools/make_levels.py) and published as [`levels.json`](/levels.json). ## 3. We validate every level programmatically `tools/make_levels.py` checks each level before it ships: - the correct bag really has the highest chance of the target colour (exact fractions); - there is no tie for the best bag; - in tier 4, the best bag is exactly 2×, 3× or 4× as likely as the next best; - every bag has 1–15 balls (they are drawn as balls, never as digits); - every hint is at most 80 characters, in both languages. ## 4. Kids test Every build is tested by 5–10 children at home, with parents present. We watch where they hesitate and which hints help. ## How the game adapts today A small rule-based engine runs in the browser: three quick correct answers in a row move the child up a tier, two misses in a row move them down, and a hint appears after about seven seconds of hesitation. Nothing is sent anywhere. ## Next (needs API credits) Live generation: Claude reads how each child plays and creates the next level just for them, plus a Hindi/English companion and parent reports.