# Solver Notes

## Formula Notes

- Regular `mosoi-289` instances are four-valued CSP encodings. DIMACS variables
  are consecutive blocks of four, and a model selects exactly one literal per
  block.
- The regular grid-coloring files contain one positive 4-clause per block,
  six negative binary clauses per block, and all-negative 4-literal nogoods.
  The nogoods match "no monochromatic axis-aligned rectangle" constraints over
  an `N x M` grid, but the solver does not rely on filenames or comments.
- Some `*.mis-*.debugged` files are transformed formulas with many auxiliary
  sequential-counter variables. They are not handled by the current SAT model
  mapper and return `UNKNOWN`.

## Techniques Used

- Structural detector for the four-variable exactly-one blocks.
- Randomized finite-domain local search over block values, using the original
  CNF clauses as the objective rather than generated constraints.
- Full internal verification of every original clause before printing
  `SATISFIABLE`. Unsupported structures or failed searches return `UNKNOWN`.

## Remaining Things To Try

- Emit VeriPB proofs for the debugged formulas. They appear to combine
  per-block pairwise positive clauses with a sequential at-most counter whose
  bound is one below the per-block minimum.
- For the debugged formulas, a promising partial proof is: derive each
  positive-binary K4 component's lower bound `x1+x2+x3+x4 >= 3` by cutting
  planes over its six pair clauses, then derive the matching global upper
  bound from the sequential counter. The lower-bound derivation verifies
  locally; the upper-bound derivation is not implemented yet.
- Add a deterministic constructive rectangle-coloring fallback for very large
  satisfiable regular grids if local search ever fails.
- Use broker results to cluster unsupported hidden instances by clause profile.

## Known Limitations

- No UNSAT proof generation is implemented yet.
- The local search is intentionally conservative: it has a time budget and
  returns `UNKNOWN` if no checked assignment is found.
- Non-four-block transformed instances are not assigned, even when they are
  likely related to the same high-level grid problem.

## Changelog

- Initial scaffold replaced with a C++ solver.
- Added DIMACS parsing, four-valued block detection, stochastic block-CSP
  search, complete model printing, and complete clause verification.
- Updated metadata and notes for the first broker submission.
- Broker submission `eval_20260507T043056Z_96850806`: 12 SAT, 17 UNKNOWN,
  0 invalid. This ties the listed Kissat solved count but returns checked SAT
  models much faster on the regular satisfiable instances.
- Investigated VeriPB proof strategy for `*.mis-*.debugged` formulas. Verified
  the per-K4 lower-bound cutting-planes step locally, but not the sequential
  counter upper-bound step needed for a complete UNSAT proof.
