rogermt commited on
Commit
63cbc50
·
verified ·
1 Parent(s): c3820f2

Task 319 analysis: rule partially cracked (192/267)

Browse files
Files changed (1) hide show
  1. medal-solvers/TASK319_ANALYSIS.md +38 -0
medal-solvers/TASK319_ANALYSIS.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Task 319 — Pattern Matching Analysis
2
+
3
+ ## Rule (Partially Cracked: 192/267 = 72%)
4
+
5
+ ### Input Structure
6
+ - Background (most common color) + 3 colored objects
7
+ - Input grid: variable size (15-20 × 15-20), output: one-hot [1,10,30,30]
8
+
9
+ ### Pattern
10
+ 1. One object is a "template" (has repeated row/col structure)
11
+ 2. Template has groups of identical consecutive rows and columns
12
+ 3. Downsample template by taking one representative from each row/col group
13
+ 4. The downsampled pattern appears as a sub-pattern of one of the other two objects
14
+ 5. Output = that matching object (its full binary pattern with its color)
15
+
16
+ ### Template Identification
17
+ - Template is NOT always the largest object by area
18
+ - Template is the object whose downsampled version matches a sub-region of another object
19
+ - Template must have at least some row or column group > 1 (compression)
20
+
21
+ ### Known Issues (75 failures)
22
+ - Some templates have non-uniform row/col groups (e.g., [1,2,1,1] or [2,4,2,2])
23
+ - The "group identical consecutive rows" approach fails when:
24
+ - Rows are similar but not identical
25
+ - The scaling is based on a different criterion than identical rows
26
+ - The template matching requires considering transposition/rotation
27
+
28
+ ### Current Score
29
+ - 2709 nodes, 26M memory, 8943 params
30
+ - Score: 7.92 points
31
+ - Need: ~12.45 points (memory+params < 282K)
32
+
33
+ ### ONNX Rebuild Approach (if rule is fully cracked)
34
+ - Small model: just need object segmentation + pattern comparison
35
+ - Key ops: ReduceSum for object detection, comparison for matching
36
+ - If rule were simple: ~50-100 nodes possible → score 13+
37
+ - But complex rule (3 candidates × variable downsampling × sub-pattern matching)
38
+ makes it hard to fit in fixed ONNX without loops