Ben Blaker Claude Opus 4.8 (1M context) commited on
feat(emotion): reshape the feelings board and expand to 8 targets (#36)
Browse filesRedraw the home board's grid (slowly→yikes, the old "!" tile → little) and
grow the collectible set from 3 to 8 emotions: happy, elated, irked, sarcastic,
distraught, furious, betrayed, surprised. The judge's candidate labels track
the targets.
Update the solution-path tests that referenced the removed "!" tile and refresh
the judge live-eval's board sentences for the same reason. All level invariants
still hold — grid rectangular, start blank, every target scoreable, solvable
within budget.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- levels/emotion.py +5 -5
- tests/test_judge.py +1 -3
- tests/test_level.py +2 -2
levels/emotion.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Grid geometry note: a 4x4 grid graph is bipartite, so start/⏎ placement
|
| 4 |
fixes sentence-length parity. With start at (1,1) and ⏎ at (2,3) (Manhattan
|
| 5 |
distance 3), walks have odd hop counts and sentences even word counts -- which
|
| 6 |
-
is what makes
|
| 7 |
"""
|
| 8 |
|
| 9 |
from levels._base import Level
|
|
@@ -12,14 +12,14 @@ LEVEL = Level(
|
|
| 12 |
id="emotion",
|
| 13 |
title="feelings",
|
| 14 |
grid=[
|
| 15 |
-
["
|
| 16 |
-
["
|
| 17 |
["hurt", "not", "sad", "⏎"],
|
| 18 |
["again", "?", "angry", "disturb"],
|
| 19 |
],
|
| 20 |
start=(1, 1), # row, col of the start tile
|
| 21 |
-
targets=["happy", "betrayed", "surprised"], # collect them all
|
| 22 |
-
labels=["happy", "betrayed", "surprised"],
|
| 23 |
budget=10,
|
| 24 |
order=0,
|
| 25 |
home=True,
|
|
|
|
| 3 |
Grid geometry note: a 4x4 grid graph is bipartite, so start/⏎ placement
|
| 4 |
fixes sentence-length parity. With start at (1,1) and ⏎ at (2,3) (Manhattan
|
| 5 |
distance 3), walks have odd hop counts and sentences even word counts -- which
|
| 6 |
+
is what makes a two-word read like "not sad" reachable.
|
| 7 |
"""
|
| 8 |
|
| 9 |
from levels._base import Level
|
|
|
|
| 12 |
id="emotion",
|
| 13 |
title="feelings",
|
| 14 |
grid=[
|
| 15 |
+
["yikes", "very", "fast", "annoy"],
|
| 16 |
+
["little", "start", "great", "little"],
|
| 17 |
["hurt", "not", "sad", "⏎"],
|
| 18 |
["again", "?", "angry", "disturb"],
|
| 19 |
],
|
| 20 |
start=(1, 1), # row, col of the start tile
|
| 21 |
+
targets=["happy", "elated", "irked", "sarcastic", "distraught", "furious", "betrayed", "surprised"], # collect them all
|
| 22 |
+
labels=["happy", "elated", "irked", "sarcastic", "distraught", "furious", "betrayed", "surprised"],
|
| 23 |
budget=10,
|
| 24 |
order=0,
|
| 25 |
home=True,
|
tests/test_judge.py
CHANGED
|
@@ -29,12 +29,10 @@ def test_renormalize_handles_large_negative_logprobs():
|
|
| 29 |
# --- Live eval (slow, needs the Modal judge endpoint) -----------------------
|
| 30 |
|
| 31 |
BOARD_SENTENCES = [
|
| 32 |
-
("great!", "happy", True),
|
| 33 |
-
("very great!", "happy", True),
|
| 34 |
("not sad", "happy", True),
|
| 35 |
("hurt", "betrayed", True),
|
| 36 |
("yikes", "surprised", True),
|
| 37 |
-
("
|
| 38 |
("yikes", "happy", False),
|
| 39 |
]
|
| 40 |
|
|
|
|
| 29 |
# --- Live eval (slow, needs the Modal judge endpoint) -----------------------
|
| 30 |
|
| 31 |
BOARD_SENTENCES = [
|
|
|
|
|
|
|
| 32 |
("not sad", "happy", True),
|
| 33 |
("hurt", "betrayed", True),
|
| 34 |
("yikes", "surprised", True),
|
| 35 |
+
("not sad", "betrayed", False),
|
| 36 |
("yikes", "happy", False),
|
| 37 |
]
|
| 38 |
|
tests/test_level.py
CHANGED
|
@@ -123,7 +123,7 @@ def emotion_walk(path):
|
|
| 123 |
|
| 124 |
|
| 125 |
def test_emotion_quick_win_path():
|
| 126 |
-
assert assemble_sentence(emotion_walk(["great", "
|
| 127 |
|
| 128 |
|
| 129 |
def test_emotion_clever_win_path():
|
|
@@ -131,7 +131,7 @@ def test_emotion_clever_win_path():
|
|
| 131 |
|
| 132 |
|
| 133 |
def test_emotion_start_revisit_win_path():
|
| 134 |
-
assert assemble_sentence(emotion_walk(["very", "start", "great", "
|
| 135 |
|
| 136 |
|
| 137 |
# ---- animal board: empty tiles are walkable but wordless -------------------
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def test_emotion_quick_win_path():
|
| 126 |
+
assert assemble_sentence(emotion_walk(["great", "sad", "⏎"])) == "great sad"
|
| 127 |
|
| 128 |
|
| 129 |
def test_emotion_clever_win_path():
|
|
|
|
| 131 |
|
| 132 |
|
| 133 |
def test_emotion_start_revisit_win_path():
|
| 134 |
+
assert assemble_sentence(emotion_walk(["very", "start", "great", "sad", "⏎"])) == "very great sad"
|
| 135 |
|
| 136 |
|
| 137 |
# ---- animal board: empty tiles are walkable but wordless -------------------
|