rogermt commited on
Commit
2b9c4a7
·
verified ·
1 Parent(s): afd4a88

Fix #5: Use real task target instead of all-zeros in minimal_runner.py

Browse files
SKILLS/arc_agi_project/references/examples/minimal_runner.py CHANGED
@@ -14,7 +14,19 @@ def quantize(phi):
14
  return np.rint(phi).astype(int)
15
 
16
  INPUT = np.array([[0,7,7],[7,7,7],[0,7,7]])
17
- TARGET = np.zeros((9,9), dtype=int)
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  def rotate90(phi):
20
  return np.rot90(phi, 1)
@@ -22,4 +34,5 @@ def rotate90(phi):
22
  if __name__ == '__main__':
23
  cand = rotate90(INPUT)
24
  cand_for_target = tile_transform(cand, TARGET.shape)
25
- print("Residue:", int((quantize(cand_for_target) != TARGET).sum()))
 
 
14
  return np.rint(phi).astype(int)
15
 
16
  INPUT = np.array([[0,7,7],[7,7,7],[0,7,7]])
17
+
18
+ # Real example1 target (9x9) — NOT all-zeros
19
+ TARGET = np.array([
20
+ [0,0,0,0,7,7,0,7,7],
21
+ [0,0,0,7,7,7,7,7,7],
22
+ [0,0,0,0,7,7,0,7,7],
23
+ [0,7,7,0,7,7,0,7,7],
24
+ [7,7,7,7,7,7,7,7,7],
25
+ [0,7,7,0,7,7,0,7,7],
26
+ [0,0,0,0,7,7,0,7,7],
27
+ [0,7,7,0,7,7,0,7,7],
28
+ [0,0,0,0,7,7,0,7,7],
29
+ ], dtype=int)
30
 
31
  def rotate90(phi):
32
  return np.rot90(phi, 1)
 
34
  if __name__ == '__main__':
35
  cand = rotate90(INPUT)
36
  cand_for_target = tile_transform(cand, TARGET.shape)
37
+ residue = int((quantize(cand_for_target) != TARGET).sum())
38
+ print("Residue:", residue)