grapheneaffiliates commited on
Commit
c014cdf
·
verified ·
1 Parent(s): 1967a3e

Upload data/arc_fewshot_examples.json with huggingface_hub

Browse files
Files changed (1) hide show
  1. data/arc_fewshot_examples.json +32 -0
data/arc_fewshot_examples.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "task_id": "0ca9ddb6",
4
+ "description": "Color 2 gets color 4 placed at its diagonal neighbors. Color 1 gets color 7 at orthogonal neighbors.",
5
+ "pairs_summary": "9x9 grids with isolated colored dots. Output adds patterns around each dot based on its color.",
6
+ "code": "def solve(grid):\n h, w = len(grid), len(grid[0])\n out = [row[:] for row in grid]\n for r in range(h):\n for c in range(w):\n if grid[r][c] == 2:\n for dr, dc in [(-1,-1),(-1,1),(1,-1),(1,1)]:\n nr, nc = r+dr, c+dc\n if 0 <= nr < h and 0 <= nc < w and out[nr][nc] == 0:\n out[nr][nc] = 4\n if grid[r][c] == 1:\n for dr, dc in [(-1,0),(1,0),(0,-1),(0,1)]:\n nr, nc = r+dr, c+dc\n if 0 <= nr < h and 0 <= nc < w and out[nr][nc] == 0:\n out[nr][nc] = 7\n return out"
7
+ },
8
+ {
9
+ "task_id": "08ed6ac7",
10
+ "description": "Vertical bars of 5s ranked by height. Tallest gets color 1, next 2, etc.",
11
+ "pairs_summary": "9x9 grids with vertical bars of 5s at different heights. Output recolors each bar by its height rank.",
12
+ "code": "def solve(grid):\n h, w = len(grid), len(grid[0])\n bars = []\n for c in range(w):\n height = sum(1 for r in range(h) if grid[r][c] == 5)\n if height > 0:\n bars.append((height, c))\n bars.sort(key=lambda x: -x[0])\n out = [[0]*w for _ in range(h)]\n for rank, (height, col) in enumerate(bars):\n color = rank + 1\n for r in range(h - height, h):\n out[r][col] = color\n return out"
13
+ },
14
+ {
15
+ "task_id": "178fcbfb",
16
+ "description": "Color 2 draws a full vertical line at its column. Colors 1,3 draw full horizontal lines at their rows. Horizontal overwrites vertical at intersections.",
17
+ "pairs_summary": "Sparse grids with a few colored dots. Output extends each into full lines.",
18
+ "code": "def solve(grid):\n h, w = len(grid), len(grid[0])\n out = [[0]*w for _ in range(h)]\n for r in range(h):\n for c in range(w):\n if grid[r][c] == 2:\n for rr in range(h): out[rr][c] = 2\n for r in range(h):\n for c in range(w):\n if grid[r][c] in (1, 3):\n for cc in range(w): out[r][cc] = grid[r][c]\n return out"
19
+ },
20
+ {
21
+ "task_id": "3aa6fb7a",
22
+ "description": "Background cells with exactly 1 neighbor of color 7 become color 1.",
23
+ "pairs_summary": "7x7 grids with blue (1) objects. Output fills specific background cells adjacent to objects.",
24
+ "code": "def solve(grid):\n h, w = len(grid), len(grid[0])\n out = [row[:] for row in grid]\n for r in range(h):\n for c in range(w):\n if grid[r][c] == 0:\n count = 0\n for dr, dc in [(-1,0),(1,0),(0,-1),(0,1)]:\n nr, nc = r+dr, c+dc\n if 0 <= nr < h and 0 <= nc < w and grid[nr][nc] == 7:\n count += 1\n if count == 1:\n out[r][c] = 1\n return out"
25
+ },
26
+ {
27
+ "task_id": "0520fde7",
28
+ "description": "Split grid at column separator (color 5). Output cell is 2 where BOTH halves have non-zero, else 0.",
29
+ "pairs_summary": "3x7 grid split by column of 5s into two 3x3 halves. Output is AND of the two halves.",
30
+ "code": "def solve(grid):\n h, w = len(grid), len(grid[0])\n sep = next(c for c in range(w) if all(grid[r][c] == 5 for r in range(h)))\n out_w = sep\n out = [[0]*out_w for _ in range(h)]\n for r in range(h):\n for c in range(out_w):\n left = grid[r][c]\n right = grid[r][sep + 1 + c]\n if left != 0 and right != 0:\n out[r][c] = 2\n return out"
31
+ }
32
+ ]