# Analysis for V37+ — Finding +38.45 pts to reach 6100 ## Current: V36 = 6061.55 | Target: 6100 | Gap: +38.45 ## Complete Task Score Audit (base submission-6043) ### Top Priority Targets (score < 12, not yet optimized) | Task | Score | Nodes | Params | Memory | Difficulty | Rule Summary | |------|-------|-------|--------|--------|------------|--------------| | 366 | 7.08 | 12512 | 51,979 | 60.4M | VERY HIGH | Shape placement at dot positions (backtracking) | | 219 | 8.42 | 532 | 3,448 | 15.8M | HIGH | Staircase continuation | | 133 | 8.95 | 368 | 228,894 | 9.1M | HIGH | Unknown (v90 failed arc-gen) | | 157 | 9.14 | 433 | 202,281 | 7.5M | HIGH | Reflect shapes + pattern matching | | 158 | 9.30 | 822 | 765 | 6.6M | HIGH | Shape copy + bridges | | 233 | 9.60 | 1372 | 142,960 | 4.8M | HIGH | Extract subgrid + fill holes | | 209 | 10.11 | 4286 | 138,262 | 2.8M | HIGH | Template-based block placement | | 44 | 10.32 | 1054 | 1,415 | 2.4M | HIGH | Fill rect holes with patches | | 200 | 10.33 | 91 | 198,010 | 2.2M | MEDIUM | Stripe pattern from seed position | | 76 | 10.34 | 220 | 229,498 | 2.1M | HIGH | Complex pattern extension | | 118 | 10.42 | 1163 | 1,887 | 2.2M | HIGH | Mark cells between color-2 markers | | 367 | 10.58 | 694 | 59,173 | 1.8M | MEDIUM | Conv-based pattern | ### Medium Priority (score 11-13, simpler rules possible) | Task | Score | Nodes | % Changed | Key Property | |------|-------|-------|-----------|--------------| | 77 | 12.83 | 72 | 5.1% | **211/266 SOLVED** - bbox fill around 8-conn 2-clusters | | 173 | 12.89 | 69 | 3.6% | Very few changes, tiny model | | 54 | 12.89 | 118 | 8.6% | | | 182 | 11.45 | 522 | 2.9% | Very few changes, Conv-based | | 191 | 11.53 | 1037 | 5.8% | Only 165 params! Pure compute | | 18 | 11.32 | 219 | 8.1% | | ## Task 77 — Partially Solved (211/266) **Rule**: For each 8-connected cluster of color-2 cells (≥2 cells), compute bounding box. Fill all fg-color cells within bbox with color 4. **Failing cases** (55/266): When 2-cells are separated by fg cells but should be treated as one group. The correct rule likely involves: - Option A: Find 2-clusters connected through exactly 1 fg cell (bridge detection) - Option B: Use a different connectivity criterion for grouping - Option C: Iterative expansion of 2-cluster bboxes **If fully solved**: Score ≈ 16+ pts (only need small model with 8-conn MaxPool + bbox ops). Gain: ~+3 pts. ## Scoring Formula Reference ``` score = max(1.0, 25.0 - ln(memory + params)) ``` | Target Score | Max (memory+params) | Reduction from 10pts base | |-------------|--------------------|----| | 15 pts | 22,026 | 2.7× | | 16 pts | 8,103 | 7.4× | | 17 pts | 2,981 | 20× | | 18 pts | 1,097 | 55× | | 20 pts | 148 | 405× | ## Key Technical Insights ### What reduces memory (from onnxruntime-perf.txt analysis) 1. **Fewer MaxPool iterations**: Each adds [1,1,30,30]×4 bytes = 3600 bytes to memory 2. **Slice to active area first**: 10×10 grid → 9× less memory per tensor vs 30×30 3. **Float16 for intermediates**: 2 bytes/element vs 4 (max gain = ln(2) = 0.69 pts) 4. **Integer types (uint8)**: 1 byte/element (max gain = ln(4) = 1.39 pts) 5. **Avoid broadcast**: [1,C,H,W] operations create huge intermediates ### What doesn't help - Graph optimization (Kaggle uses ORT_DISABLE_ALL) - Initializer dtype (params counts elements, not bytes) - Removing value_info (scorer runs shape_inference) ## Recommended Strategy ### Path 1: Complete 6-8 new tasks at +5 avg each = +30-40 pts Focus on tasks where Python solver exists (in own-solver/) and can be converted to compact ONNX. ### Path 2: Improve existing + a few new tasks - Improve task 285 from 8.82→10+ (reduce MaxPool iterations): +1-2 pts - Complete task 77 (if 266/266): +3 pts - Build 5-6 new compact solvers: +25-30 pts ### Path 3: Systematic wave22 conversion The wave22.py file has 266/266 solvers for many tasks. These are already working Python implementations. Converting the simplest ones to compact ONNX could be highly productive. ## Files Modified - None (analysis only) ## Next Steps 1. Complete Task 77 rule (test bridge connectivity between 2-clusters) 2. Look at wave22 solvers for tasks in our target list 3. Profile existing optimized models to verify scores