Game of 24 Example
// Game of 24: {4, 5, 6, 10}
Level 0: {4, 5, 6, 10}
Level 1 (generate 5 thoughts):
A: 10 - 4 = 6 → {5, 6, 6}
B: 5 × 4 = 20 → {6, 10, 20}
C: 10 - 6 = 4 → {4, 4, 5}
D: 6 - 4 = 2 → {2, 5, 10}
E: 10 + 4 = 14 → {5, 6, 14}
Evaluate: (LLM judges each)
A: "maybe" B: "maybe" C: "maybe"
D: "sure" E: "maybe"
Keep top b=5
Level 2 (from D: {2, 5, 10}):
D1: 2 × 10 = 20 → {5, 20}
D2: 5 × 2 = 10 → {10, 10}
D3: 10 / 2 = 5 → {5, 5}
...
Level 3 (from D1: {5, 20}):
D1a: 20 + 5 = 25 → ✗
D1b: 20 - 5 = 15 → ✗
...
From A: {5, 6, 6}:
A1: 5 - 6 = -1 → ...
A2: 6 - 5 = 1 → {1, 6}
A2a: 6 / 1 ... no
// Eventually finds: (6-4)×(10+5)...
// wait, that's 30. Keep searching!