# Random k-SAT Solver v10

## Instance Family
Random k-SAT from generators: okgen, OKgenerator, gencnf, fla-{barthel,komb,qhid}
- k ranges from 3 to 10 (most instances k=3)
- Variable counts: 20 to 12000+
- Clause/variable ratios near k-SAT thresholds
- Phase transition thresholds: k=3→4.267, k=4→9.93, k=5→21.12, k=6→43.37, k=7→87.79
- 5cnf/6cnf/7cnf instances: small vars (20-170), mixed clause widths, some crafted UNSAT below threshold

## Approach
1. **probSAT (SLS)**: Primary for SAT. Exponential break-value weighting with per-k tuned cb.
2. **CDCL**: For UNSAT with VeriPB proof. Features:
   - 1-UIP conflict analysis
   - Heap-based VSIDS (O(log n) variable selection)
   - Phase saving
   - LBD-based glue clause protection (keep LBD ≤ 2)
   - Activity-based reduceDB with 50K threshold cap
   - Fixed restart interval (512 conflicts)
3. **Ratio-based budget**: Uses k-SAT phase transition thresholds to predict SAT/UNSAT

## Time Budget
- Tiny (≤200 vars): CDCL first (70% if likely UNSAT, 20% otherwise), then SLS, then CDCL remainder
- Medium (200-3000 vars): SLS first (2-90% depending on ratio), then CDCL remainder
- Large (>3000 vars): ~100% SLS (CDCL too expensive)

## Proof Output
VeriPB v3.0 format. Each CDCL learned clause output as RUP rule. Empty clause (>= 1) for contradiction.

## Submission History
- v1: probSAT + simple DPLL → 354 SAT + 0 UNSAT = 354
- v2: Added CDCL with VeriPB proof → 348 SAT + 35 UNSAT = 383 (matched Kissat)
- v3: Heap VSIDS, bad OOM handling → 350 SAT + 0 UNSAT = 350 (regression, 34 OOM)
- v4: OOM prevention via maxLearned limit, adjusted time splits → 347 SAT + 0 UNSAT (35 OOM)
- v5: Fixed restarts (512), positive polarity, linear-scan VSIDS → 352 SAT + 36 UNSAT = 388 (beat Kissat!)
- v6: Added clause deletion (reduceDB), fixed OOM → 351 SAT + 74 UNSAT = 425 (+42 over Kissat)
- v7: Ratio-based budget, phase saving, LBD (proof issues)
- v8: Heap VSIDS, CDCL-first for tiny instances, fixed proofs → 360 SAT + 73 UNSAT = 433
- v8b: Added clause minimization → 357 SAT + 74 UNSAT = 431 (slight regression)
- v9: Quick CDCL probe + full SLS for tiny instances, better budget splits → testing

## Submission History
- v1: probSAT only → 354 SAT + 0 UNSAT = 354
- v2: Added CDCL with VeriPB → 348 SAT + 35 UNSAT = 383 (matched Kissat)
- v3: Heap VSIDS, bad OOM handling → 350 SAT + 0 UNSAT = 350 (regression, 34 OOM)
- v4: OOM prevention via maxLearned limit → 347 SAT + 0 UNSAT (35 OOM)
- v5: Fixed restarts (512), positive polarity, linear-scan VSIDS → 352 SAT + 36 UNSAT = 388 (beat Kissat!)
- v6: Added clause deletion (reduceDB), fixed OOM → 351 SAT + 74 UNSAT = 425 (+42 over Kissat)
- v7: Ratio-based budget, phase saving, LBD (proof issues)
- v8: Heap VSIDS, CDCL-first for tiny instances, fixed proofs → 360 SAT + 73 UNSAT = 433
- v8b: Added clause minimization → 357 SAT + 74 UNSAT = 431 (slight regression, 4 prover-timeout)
- v9: Quick CDCL probe + full SLS for tiny, better budgets → 362 SAT + 72 UNSAT = 434 (3 prover-timeout)
- v10: Clause minimization + proof deletion (del id) → TESTING

## Known Issues / Next Steps
- 3 prover-timeout instances (500-var): proof deletion should fix these (verified locally: 60s vs timeout)
- 17 okgen UNSAT instances Kissat solves that we don't (300-600 vars)
- Large SAT instances (>3000 vars) rely solely on probSAT
- Some crafted UNSAT instances have ratio below k-SAT threshold
- Consider: better restart strategy (Luby, geometric), clause vivification
