Update README with v5.1 results: 87 solved, LB 1164.25
Browse files- own-solver/README.md +56 -40
own-solver/README.md
CHANGED
|
@@ -1,19 +1,23 @@
|
|
| 1 |
-
# NeuroGolf Solver v5
|
| 2 |
|
| 3 |
Builds minimal ONNX networks for ARC-AGI tasks. Modular Python package with opset 17, zero-cost Slice-based transforms.
|
| 4 |
|
| 5 |
-
**
|
| 6 |
|
| 7 |
## Version History
|
| 8 |
|
| 9 |
-
| Version | Date | Solved
|
| 10 |
-
|---------|------|----------------|-----------
|
| 11 |
-
| **v5** | **2026-
|
| 12 |
-
|
|
| 13 |
-
|
|
| 14 |
-
|
|
| 15 |
-
|
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Project Structure
|
| 19 |
|
|
@@ -28,19 +32,28 @@ neurogolf_solver/ # Python package (v5)
|
|
| 28 |
βββ onnx_helpers.py # Opset 17 builders (Slice, Pad, ReduceSum, mk)
|
| 29 |
βββ profiler.py # Static cost profiler (fallback for onnx_tool)
|
| 30 |
βββ submission.py # run_tasks with W&B logging, zip/csv generation
|
|
|
|
| 31 |
βββ validators.py # Model validation against train+test+arc-gen
|
| 32 |
βββ solvers/
|
| 33 |
βββ __init__.py # Exports solve_task, ANALYTICAL_SOLVERS
|
| 34 |
βββ analytical.py # identity, constant, color_map, transpose
|
| 35 |
βββ conv.py # lstsq conv solvers (fixed, variable, diffshape, var_diff)
|
|
|
|
| 36 |
βββ geometric.py # flip, rotate, shift, crop, gravity
|
| 37 |
-
βββ
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
```
|
| 45 |
|
| 46 |
## Quick Start
|
|
@@ -48,21 +61,18 @@ neurogolf-2026-solver-notebooks.zip # 5 reference notebooks (LB 4000+)
|
|
| 48 |
```bash
|
| 49 |
# Clone
|
| 50 |
git clone https://huggingface.co/rogermt/neurogolf-solver
|
| 51 |
-
cd neurogolf-solver
|
| 52 |
|
| 53 |
# Install deps
|
| 54 |
pip install numpy onnx onnxruntime
|
| 55 |
|
| 56 |
-
#
|
| 57 |
-
|
| 58 |
|
| 59 |
-
# Run (local)
|
| 60 |
python -m neurogolf_solver.main --data_dir ARC-AGI/data/training/ --output_dir submission --conv_budget 30
|
| 61 |
|
| 62 |
-
#
|
| 63 |
-
python -m neurogolf_solver.main --kaggle --data_dir /kaggle/input/competitions/neurogolf-2026/ --output_dir /kaggle/working/submission --conv_budget 60
|
| 64 |
-
|
| 65 |
-
# With ARC-GEN data and W&B logging
|
| 66 |
python -m neurogolf_solver.main --data_dir ARC-AGI/data/training/ --arcgen_dir ARC-GEN-100K/ --output_dir submission --use_wandb
|
| 67 |
```
|
| 68 |
|
|
@@ -84,8 +94,8 @@ python -m neurogolf_solver.main --data_dir ARC-AGI/data/training/ --arcgen_dir A
|
|
| 84 |
**Format:** Input/output = `[1, 10, 30, 30]` one-hot float32. ONNX opset 17, IR version 8.
|
| 85 |
|
| 86 |
**Solver pipeline (in order):**
|
| 87 |
-
1. **Analytical solvers** (instant, near-zero cost):
|
| 88 |
-
identity β constant β color_map β transpose β flip β rotate β shift β tile β upscale β kronecker β nonuniform_scale β mirror_h β mirror_v β quad_mirror β concat β concat_enhanced β diagonal_tile β fixed_crop β spatial_gather β varshape_spatial_gather
|
| 89 |
|
| 90 |
2. **Conv solvers** (learned via least-squares, validated against arc-gen):
|
| 91 |
- `conv_fixed` β Slice β Conv β ArgMax β Equal+Cast β Pad
|
|
@@ -93,18 +103,16 @@ python -m neurogolf_solver.main --data_dir ARC-AGI/data/training/ --arcgen_dir A
|
|
| 93 |
- `conv_diffshape` β Slice β Conv β Slice(crop) β ArgMax β Equal+Cast β Pad
|
| 94 |
- `conv_var_diff` β Conv(30Γ30) β ArgMax β Equal+Cast β Mul(input_mask)
|
| 95 |
|
| 96 |
-
## v5
|
| 97 |
|
| 98 |
-
|
|
| 99 |
-
|--------|--------|
|
| 100 |
-
|
|
| 101 |
-
|
|
| 102 |
-
|
|
| 103 |
-
|
|
| 104 |
-
|
|
| 105 |
-
|
|
| 106 |
-
| **lstsq crash fix: try/except LinAlgError** | Prevents SVD non-convergence crash (task 313) |
|
| 107 |
-
| **Refactored to 16-file package** | Maintainable, testable, no more monolith |
|
| 108 |
|
| 109 |
## Scoring
|
| 110 |
|
|
@@ -112,8 +120,8 @@ python -m neurogolf_solver.main --data_dir ARC-AGI/data/training/ --arcgen_dir A
|
|
| 112 |
Score per task = max(1.0, 25.0 - ln(MACs + memory_bytes + params))
|
| 113 |
```
|
| 114 |
|
| 115 |
-
- Analytical solvers (Slice/Transpose/Gather) β near-zero cost β ~
|
| 116 |
-
- Conv solvers β cost proportional to kernel size β ~
|
| 117 |
- Unsolved β 1.0 pt minimum
|
| 118 |
|
| 119 |
## Competition Rules
|
|
@@ -127,6 +135,14 @@ Score per task = max(1.0, 25.0 - ln(MACs + memory_bytes + params))
|
|
| 127 |
| Excluded tasks | {21, 55, 80, 184, 202, 366} |
|
| 128 |
| Validation | Models checked against train + test + arc-gen (ALL splits) |
|
| 129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
## Key Docs
|
| 131 |
|
| 132 |
- **SKILL.md** β Competition rules, architecture, methodology, checklist
|
|
|
|
| 1 |
+
# NeuroGolf Solver v5.1
|
| 2 |
|
| 3 |
Builds minimal ONNX networks for ARC-AGI tasks. Modular Python package with opset 17, zero-cost Slice-based transforms.
|
| 4 |
|
| 5 |
+
**Public LB: 1164.25** (V38, 87/400 solved)
|
| 6 |
|
| 7 |
## Version History
|
| 8 |
|
| 9 |
+
| Version | Date | Solved | Est LB | Public LB | Key Changes |
|
| 10 |
+
|---------|------|--------|--------|-----------|-------------|
|
| 11 |
+
| **v5.1** | **2026-05-16** | **87** | **1088.8** | **1164.25** | Wave 5: +6 analytical solvers (border_detect, fill_bbox, find_hole, row_uniform, majority_replace, symmetry_check). +7 tasks over v5.0 |
|
| 12 |
+
| v5.0 | 2026-05-16 | 80 | 995.5 | 1071.38 | Baseline v5 on Kaggle with conv_budget=5 |
|
| 13 |
+
| v5-dev | 2026-04-26 | β | β | β | Refactored to package, opset 17, Slice-based flip/rotate (0 MACs), lstsq crash fix, tensor-based Pad & ReduceSum |
|
| 14 |
+
| v4.3 | 2026-04-25 | 307* | ~670 | β | Methodology docs, no code changes |
|
| 15 |
+
| v4.0 | 2026-04-24 | 307* | ~656 | β | ARC-GEN validation, static profiler |
|
| 16 |
+
| v3 | 2026-04-24 | 307* | 501 | β | concat_enhanced, varshape_spatial_gather |
|
| 17 |
+
| v2 | prior | 294* | β | β | Spatial_gather, variable-shape conv |
|
| 18 |
+
| v1 | prior | 128* | β | β | Conv solver only |
|
| 19 |
+
|
| 20 |
+
*Local solve count (not all pass ARC-GEN validation)
|
| 21 |
|
| 22 |
## Project Structure
|
| 23 |
|
|
|
|
| 32 |
βββ onnx_helpers.py # Opset 17 builders (Slice, Pad, ReduceSum, mk)
|
| 33 |
βββ profiler.py # Static cost profiler (fallback for onnx_tool)
|
| 34 |
βββ submission.py # run_tasks with W&B logging, zip/csv generation
|
| 35 |
+
βββ task_scanner.py # Task analysis utilities
|
| 36 |
βββ validators.py # Model validation against train+test+arc-gen
|
| 37 |
βββ solvers/
|
| 38 |
βββ __init__.py # Exports solve_task, ANALYTICAL_SOLVERS
|
| 39 |
βββ analytical.py # identity, constant, color_map, transpose
|
| 40 |
βββ conv.py # lstsq conv solvers (fixed, variable, diffshape, var_diff)
|
| 41 |
+
βββ edge.py # Edge detection solver
|
| 42 |
βββ geometric.py # flip, rotate, shift, crop, gravity
|
| 43 |
+
βββ gravity.py # Unrolled gravity solver
|
| 44 |
+
βββ mode.py # Mode fill solver
|
| 45 |
+
βββ solver_registry.py # Solver ordering + solve_task orchestration (66 solvers)
|
| 46 |
+
βββ tiling.py # tile, upscale, mirror, concat, spatial_gather
|
| 47 |
+
βββ wave1.py # downsample, symmetry_complete, extract_inner, etc.
|
| 48 |
+
βββ wave2.py # overlay, bbox_crop, row/col_mode_fill, swap, etc.
|
| 49 |
+
βββ wave3.py # split_and_merge, self_tile
|
| 50 |
+
βββ wave4.py # Object extraction (densest/smallest/largest), symmetry_max, crop
|
| 51 |
+
βββ wave5.py # Row-uniform, majority-replace, find-hole, fill-bbox, border, symmetry-check
|
| 52 |
+
βββ _classify_dominant.py # Classify by dominant color
|
| 53 |
+
βββ _misc_solvers.py # keep_first_third_cols, marker_extract
|
| 54 |
+
βββ _replace_col0.py # Replace color from column 0
|
| 55 |
+
βββ _variable_fliplr.py # Variable-width horizontal flip
|
| 56 |
+
βββ _variable_flipud.py # Variable-height vertical flip
|
| 57 |
```
|
| 58 |
|
| 59 |
## Quick Start
|
|
|
|
| 61 |
```bash
|
| 62 |
# Clone
|
| 63 |
git clone https://huggingface.co/rogermt/neurogolf-solver
|
| 64 |
+
cd neurogolf-solver/own-solver
|
| 65 |
|
| 66 |
# Install deps
|
| 67 |
pip install numpy onnx onnxruntime
|
| 68 |
|
| 69 |
+
# Run (Kaggle)
|
| 70 |
+
python -m neurogolf_solver.main --kaggle --data_dir /kaggle/input/competitions/neurogolf-2026/ --output_dir /kaggle/working/submission --conv_budget 5 --use_wandb
|
| 71 |
|
| 72 |
+
# Run (local with ARC data)
|
| 73 |
python -m neurogolf_solver.main --data_dir ARC-AGI/data/training/ --output_dir submission --conv_budget 30
|
| 74 |
|
| 75 |
+
# With ARC-GEN data
|
|
|
|
|
|
|
|
|
|
| 76 |
python -m neurogolf_solver.main --data_dir ARC-AGI/data/training/ --arcgen_dir ARC-GEN-100K/ --output_dir submission --use_wandb
|
| 77 |
```
|
| 78 |
|
|
|
|
| 94 |
**Format:** Input/output = `[1, 10, 30, 30]` one-hot float32. ONNX opset 17, IR version 8.
|
| 95 |
|
| 96 |
**Solver pipeline (in order):**
|
| 97 |
+
1. **Analytical solvers** (instant, near-zero cost, 66 solvers):
|
| 98 |
+
identity β constant β color_map β transpose β flip β rotate β shift β tile β upscale β kronecker β nonuniform_scale β mirror_h β mirror_v β quad_mirror β concat β concat_enhanced β diagonal_tile β fixed_crop β spatial_gather β varshape_spatial_gather β gravity_unrolled β edge_detect β mode_fill β [wave1-5 solvers] β marker_extract β **wave5**: row_uniform_fill, majority_replace_5, find_color_with_hole, fill_bbox_per_color, border_detect, symmetry_check_lr
|
| 99 |
|
| 100 |
2. **Conv solvers** (learned via least-squares, validated against arc-gen):
|
| 101 |
- `conv_fixed` β Slice β Conv β ArgMax β Equal+Cast β Pad
|
|
|
|
| 103 |
- `conv_diffshape` β Slice β Conv β Slice(crop) β ArgMax β Equal+Cast β Pad
|
| 104 |
- `conv_var_diff` β Conv(30Γ30) β ArgMax β Equal+Cast β Mul(input_mask)
|
| 105 |
|
| 106 |
+
## v5.1 Wave 5 Solvers
|
| 107 |
|
| 108 |
+
| Solver | Task | ARC-GEN | Cost | Technique |
|
| 109 |
+
|--------|------|---------|------|-----------|
|
| 110 |
+
| `row_uniform_fill` | 52 | 262/262 | 37,901 | Check col equality via int-encode + Slice + Equal |
|
| 111 |
+
| `majority_replace_5` | 229 | 262/262 | 38,850 | ArgMax channel counts β majority mask β Where |
|
| 112 |
+
| `find_color_with_hole` | 291 | 261/261 | 96,172 | Per-channel bbox_area - pixel_count β ArgMax deficit |
|
| 113 |
+
| `fill_bbox_per_color` | 132 | 262/262 | 310,001 | CumSum forward + backward > 0 = range fill per color |
|
| 114 |
+
| `border_detect` | 98 | 262/262 | 270,849 | Pad+Slice shifted copies β Min (erosion) β Sub from non_bg |
|
| 115 |
+
| `symmetry_check_lr` | 103 | 215/215 | 37,785 | Gather(reverse cols) β Equal β ReduceMin β index color_select |
|
|
|
|
|
|
|
| 116 |
|
| 117 |
## Scoring
|
| 118 |
|
|
|
|
| 120 |
Score per task = max(1.0, 25.0 - ln(MACs + memory_bytes + params))
|
| 121 |
```
|
| 122 |
|
| 123 |
+
- Analytical solvers (Slice/Transpose/Gather) β near-zero cost β ~14-16 pts
|
| 124 |
+
- Conv solvers β cost proportional to kernel size β ~8-11 pts
|
| 125 |
- Unsolved β 1.0 pt minimum
|
| 126 |
|
| 127 |
## Competition Rules
|
|
|
|
| 135 |
| Excluded tasks | {21, 55, 80, 184, 202, 366} |
|
| 136 |
| Validation | Models checked against train + test + arc-gen (ALL splits) |
|
| 137 |
|
| 138 |
+
## v5.0 β v5.1 Changes
|
| 139 |
+
|
| 140 |
+
| Change | Impact |
|
| 141 |
+
|--------|--------|
|
| 142 |
+
| **+wave5.py** (6 solvers) | +7 tasks solved (52, 98, 103, 132, 229, 291 + conv_fixed now catches 305) |
|
| 143 |
+
| **No existing code modified** | Only import + 6 entries appended to ANALYTICAL_SOLVERS |
|
| 144 |
+
| **LB 1071 β 1164** | +93 points (+8.7%) |
|
| 145 |
+
|
| 146 |
## Key Docs
|
| 147 |
|
| 148 |
- **SKILL.md** β Competition rules, architecture, methodology, checklist
|