File size: 3,322 Bytes
232313d
 
 
 
d25cd8a
232313d
 
 
 
 
 
 
 
 
 
 
 
d25cd8a
 
232313d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# JevSpatial v1 (evaluation only)

Games and spatial relations where code computes the consequences and the model decides: the game code words what each move
would do, the model answers one yes/no question per move, the move with the highest P(yes) is played. Every gold label is
computed by code (`spatial_bench.py`).

## Skills (2,040 items, 5,674 questions, seed 0)

| skill | items | what it measures |
|---|---|---|
| `game_q` | 440 | facts INSIDE the question ("Moving up: the snake moves closer to the food. Should the snake move up?"), minimal status state, one noul per move, gold true for the best move(s) |
| `game_s` | 440 | same situations, consequences in the STATE (`{"if the snake moves up": ...}`), plain questions ("Is moving up a good move?" per move + a choice over the moves when one is strictly best) |
| `game_rule` | 320 | situation in the state, rule in the question ("... a cactus closer than 60 px must be jumped over ... Should the dinosaur jump now?"): a noul per option and a choice |
| `spatial_coord` | 420 | coordinates in the state: left/right/above/below, nearer (Manhattan or Euclidean stated), inside a rectangle, does a step reduce the distance, best step, within a distance (70 each) |
| `spatial_grid` | 420 | ASCII grids 5x5 to 9x9 + legend: relative position, is a cell empty, count in a row (score) / column (choice), adjacency (84 each) |

Games and `split` tags (every game item carries `"split"`; `spatial_*` items are `"generic"`):
`seen_game` = Snake, Dino );
`unseen_game` = Breakout, Whac-A-Mole, Knife Hit, 2048, Tetris, Pac-Man (games whose mechanics differ from the common ones: a generalisation split). Counts: game_q / game_s 200 seen + 240 unseen;
game_rule 110 Dino + 70 each Breakout / Whac-A-Mole / Pac-Man.

Gold: for every move the consequence class is computed (Snake: eats / closer by BFS path / farther / cut off / dies;
Dino: obstacle kind x phase far|now; Breakout: paddle catches / closer / away; 2048: biggest merge / smaller / slide /
nothing; Tetris: lines cleared / flat / holes with a real drop simulation; Knife Hit: free slot vs stuck knife;
Pac-Man: dot / empty / wall / ghost; Whac-A-Mole: mole / empty / bomb). The best moves share the top rank, so a
question's gold does not depend on the other moves. Balanced by construction: the best move is spread evenly over the
move positions; 37.8% of all noul gold is true, so the scorer also reports balanced accuracy.

## Metrics (skill ids in the dataset: game_q = games_spatial/game_moves_facts_in_question, game_s = ...facts_in_state, game_rule = game_rules, spatial_coord = spatial_coordinates, spatial_grid = spatial_grids)

`score.py` reports per skill accuracy / Brier / ECE, `per_split` (`skill/seen_game` vs `skill/unseen_game`),
`extras`: `balanced_accuracy` (yes/no skills)
and `pick_accuracy/<split>` for items with `"pick": true` (game_q, game_s, game_rule): argmax of P(yes) over the item's
moves is a best move (ties share credit).

## Files and how to run

- Build: `python spatial_bench.py --out DIR` writes `jevspatial_v1_items.json.gz` (a few seconds, no network).
- Closed loop: `play_bench.py` (Snake 12x12, Dino, Breakout, Whac-A-Mole; both framings; fixed seeds; `--decider mlx|http|oracle|random`). The simulators are toy physics, so numbers compare deciders, not game skill.