# Solver Notes

## Formula Notes

- Training instances are comment-free uniform 3-CNF formulas from the
  `random-mus` family, typically 300-330 variables and 1000-1150 clauses.
- Clause density is about 3.3-3.5. Literal polarity is almost balanced and the
  variable incidence graph looks random: no obvious cardinality, XOR, grid, or
  permutation blocks were found.
- Stochastic local search reaches assignments falsifying only one clause very
  quickly on the presumed UNSAT instances. This matches minimally-unsatisfiable
  random 3-CNF behavior and explains why CDCL can be hard despite the small
  files.
- The known SAT training cases are solved by local search quickly. The solver
  never trusts the search state directly; it verifies every original clause
  before printing `SATISFIABLE`.

## Techniques Used

- A probSAT-style stochastic local search specialized for exact 3-CNF:
  unsatisfied clauses are maintained incrementally, and flip choices use
  make/break scores with a small rotation of break exponents.
- A bounded from-scratch CDCL engine is included for UNSAT attempts. Learned
  clauses are logged as VeriPB `rup` constraints. The solver only exits 20 when
  it derives a root-level contradiction and closes a VeriPB proof.
- Unsupported formulas, failed proof search, and exhausted budgets return
  `UNKNOWN`.

## Remaining Things To Try

- Improve the complete proof engine: better restarts, phase saving, clause
  deletion, LBD-based activity, and proof-size control.
- Explore MUS-specific proof tactics. The local-search evidence suggests every
  UNSAT instance has many near-solutions with one falsified clause, but this
  has not yet been converted into a compact VeriPB refutation.
- Try additional local-search heuristics such as CCAnr/Sparrow-style
  configuration checking for harder SAT variants.

## Known Limitations

- The SAT path is strong for the observed satisfiable random 3-CNF cases but is
  incomplete.
- The UNSAT path is intentionally conservative and may return `UNKNOWN` on the
  hard random MUS instances instead of risking an invalid proof.
- Default CDCL proof-search budget is capped after local full-budget attempts
  failed to close the easiest known UNSAT instance; increase `CDCL_LIMIT` for
  long experiments.
- Runtime behavior does not depend on filenames, hashes, or comments.

## Changelog

- Initial scaffold replaced with a C++ hybrid solver.
- Added DIMACS parser, exact 3-CNF detector, probSAT-style local search, full
  SAT model verification, and SAT output.
- Added bounded CDCL with watched literals, first-UIP style learned clauses,
  and VeriPB RUP proof logging for root-level UNSAT.
- Updated metadata and this working notebook for the first broker submission.
- Broker submission `eval_20260507T045018Z_9c5e4c8f` solved 4 SAT and
  returned 8 UNKNOWN, with no invalid answers. This did not beat the
  `kissat-sc2024` solved count because no random MUS UNSAT proof was closed.
- Fixed learned-clause insertion to preserve the asserting literal instead of
  sorting learned clauses. Added best-local-search phase initialization,
  aggressive CDCL restarts, random branch noise, and learned-clause database
  reduction. Local 3a UNSAT tests still return UNKNOWN after a full budget.
