Add V37 analysis: full scoring audit, task 77 partial solve (211/266), strategy recommendations
Browse files
medal-solvers/ANALYSIS_V37.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Analysis for V37+ — Finding +38.45 pts to reach 6100
|
| 2 |
+
|
| 3 |
+
## Current: V36 = 6061.55 | Target: 6100 | Gap: +38.45
|
| 4 |
+
|
| 5 |
+
## Complete Task Score Audit (base submission-6043)
|
| 6 |
+
|
| 7 |
+
### Top Priority Targets (score < 12, not yet optimized)
|
| 8 |
+
|
| 9 |
+
| Task | Score | Nodes | Params | Memory | Difficulty | Rule Summary |
|
| 10 |
+
|------|-------|-------|--------|--------|------------|--------------|
|
| 11 |
+
| 366 | 7.08 | 12512 | 51,979 | 60.4M | VERY HIGH | Shape placement at dot positions (backtracking) |
|
| 12 |
+
| 219 | 8.42 | 532 | 3,448 | 15.8M | HIGH | Staircase continuation |
|
| 13 |
+
| 133 | 8.95 | 368 | 228,894 | 9.1M | HIGH | Unknown (v90 failed arc-gen) |
|
| 14 |
+
| 157 | 9.14 | 433 | 202,281 | 7.5M | HIGH | Reflect shapes + pattern matching |
|
| 15 |
+
| 158 | 9.30 | 822 | 765 | 6.6M | HIGH | Shape copy + bridges |
|
| 16 |
+
| 233 | 9.60 | 1372 | 142,960 | 4.8M | HIGH | Extract subgrid + fill holes |
|
| 17 |
+
| 209 | 10.11 | 4286 | 138,262 | 2.8M | HIGH | Template-based block placement |
|
| 18 |
+
| 44 | 10.32 | 1054 | 1,415 | 2.4M | HIGH | Fill rect holes with patches |
|
| 19 |
+
| 200 | 10.33 | 91 | 198,010 | 2.2M | MEDIUM | Stripe pattern from seed position |
|
| 20 |
+
| 76 | 10.34 | 220 | 229,498 | 2.1M | HIGH | Complex pattern extension |
|
| 21 |
+
| 118 | 10.42 | 1163 | 1,887 | 2.2M | HIGH | Mark cells between color-2 markers |
|
| 22 |
+
| 367 | 10.58 | 694 | 59,173 | 1.8M | MEDIUM | Conv-based pattern |
|
| 23 |
+
|
| 24 |
+
### Medium Priority (score 11-13, simpler rules possible)
|
| 25 |
+
|
| 26 |
+
| Task | Score | Nodes | % Changed | Key Property |
|
| 27 |
+
|------|-------|-------|-----------|--------------|
|
| 28 |
+
| 77 | 12.83 | 72 | 5.1% | **211/266 SOLVED** - bbox fill around 8-conn 2-clusters |
|
| 29 |
+
| 173 | 12.89 | 69 | 3.6% | Very few changes, tiny model |
|
| 30 |
+
| 54 | 12.89 | 118 | 8.6% | |
|
| 31 |
+
| 182 | 11.45 | 522 | 2.9% | Very few changes, Conv-based |
|
| 32 |
+
| 191 | 11.53 | 1037 | 5.8% | Only 165 params! Pure compute |
|
| 33 |
+
| 18 | 11.32 | 219 | 8.1% | |
|
| 34 |
+
|
| 35 |
+
## Task 77 — Partially Solved (211/266)
|
| 36 |
+
|
| 37 |
+
**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.
|
| 38 |
+
|
| 39 |
+
**Failing cases** (55/266): When 2-cells are separated by fg cells but should be treated as one group. The correct rule likely involves:
|
| 40 |
+
- Option A: Find 2-clusters connected through exactly 1 fg cell (bridge detection)
|
| 41 |
+
- Option B: Use a different connectivity criterion for grouping
|
| 42 |
+
- Option C: Iterative expansion of 2-cluster bboxes
|
| 43 |
+
|
| 44 |
+
**If fully solved**: Score ≈ 16+ pts (only need small model with 8-conn MaxPool + bbox ops). Gain: ~+3 pts.
|
| 45 |
+
|
| 46 |
+
## Scoring Formula Reference
|
| 47 |
+
|
| 48 |
+
```
|
| 49 |
+
score = max(1.0, 25.0 - ln(memory + params))
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
| Target Score | Max (memory+params) | Reduction from 10pts base |
|
| 53 |
+
|-------------|--------------------|----|
|
| 54 |
+
| 15 pts | 22,026 | 2.7× |
|
| 55 |
+
| 16 pts | 8,103 | 7.4× |
|
| 56 |
+
| 17 pts | 2,981 | 20× |
|
| 57 |
+
| 18 pts | 1,097 | 55× |
|
| 58 |
+
| 20 pts | 148 | 405× |
|
| 59 |
+
|
| 60 |
+
## Key Technical Insights
|
| 61 |
+
|
| 62 |
+
### What reduces memory (from onnxruntime-perf.txt analysis)
|
| 63 |
+
1. **Fewer MaxPool iterations**: Each adds [1,1,30,30]×4 bytes = 3600 bytes to memory
|
| 64 |
+
2. **Slice to active area first**: 10×10 grid → 9× less memory per tensor vs 30×30
|
| 65 |
+
3. **Float16 for intermediates**: 2 bytes/element vs 4 (max gain = ln(2) = 0.69 pts)
|
| 66 |
+
4. **Integer types (uint8)**: 1 byte/element (max gain = ln(4) = 1.39 pts)
|
| 67 |
+
5. **Avoid broadcast**: [1,C,H,W] operations create huge intermediates
|
| 68 |
+
|
| 69 |
+
### What doesn't help
|
| 70 |
+
- Graph optimization (Kaggle uses ORT_DISABLE_ALL)
|
| 71 |
+
- Initializer dtype (params counts elements, not bytes)
|
| 72 |
+
- Removing value_info (scorer runs shape_inference)
|
| 73 |
+
|
| 74 |
+
## Recommended Strategy
|
| 75 |
+
|
| 76 |
+
### Path 1: Complete 6-8 new tasks at +5 avg each = +30-40 pts
|
| 77 |
+
Focus on tasks where Python solver exists (in own-solver/) and can be converted to compact ONNX.
|
| 78 |
+
|
| 79 |
+
### Path 2: Improve existing + a few new tasks
|
| 80 |
+
- Improve task 285 from 8.82→10+ (reduce MaxPool iterations): +1-2 pts
|
| 81 |
+
- Complete task 77 (if 266/266): +3 pts
|
| 82 |
+
- Build 5-6 new compact solvers: +25-30 pts
|
| 83 |
+
|
| 84 |
+
### Path 3: Systematic wave22 conversion
|
| 85 |
+
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.
|
| 86 |
+
|
| 87 |
+
## Files Modified
|
| 88 |
+
- None (analysis only)
|
| 89 |
+
|
| 90 |
+
## Next Steps
|
| 91 |
+
1. Complete Task 77 rule (test bridge connectivity between 2-clusters)
|
| 92 |
+
2. Look at wave22 solvers for tasks in our target list
|
| 93 |
+
3. Profile existing optimized models to verify scores
|