# Solver Notes

## Formula Notes

- Target family is a compact encoding of the 5x5 24-puzzle.
- The encoding does not need comments. The solver recovers:
  - 130 state bits: two 5-bit one-hot vectors for blank row/column and 24 tile-code slots.
  - Four action direction auxiliaries per step, decoded from two action bits.
  - Deterministic transition permutations from XNOR/AND Tseitin blocks.
  - Goal-state constants from the final goal detector used by the final long OR.
- Even-depth formulas include an initial goal detector before the first transition; odd-depth formulas start transitions immediately after the initial-state assertion. The implementation detects the first action-bit pair structurally and derives the first next-state block from it.
- SAT formulas in the visible split are solved at their encoded bound. UNSAT formulas are not proven; the solver returns UNKNOWN.

## Techniques Used

- Structural CNF recovery of the compact state layout and transition relation.
- Decoding to a standard 5x5 board by propagating slot-to-board-position maps from the goal state.
- IDA* over recovered puzzle moves with Manhattan distance plus linear conflict.
- Action-sequence to CNF-model reconstruction by assigning action bits, running unit propagation through the original CNF, filling any remaining variables, and verifying every clause before printing `SATISFIABLE`.

## Remaining Things To Try

- Add a VeriPB proof strategy for UNSAT depth bounds. Current solver intentionally avoids UNSAT claims.
- Add stronger heuristics such as walking distance or pattern databases for deeper hidden SAT instances if Manhattan plus linear conflict becomes insufficient.
- Reduce model reconstruction memory if hidden formulas are much larger; current occurrence-list propagation is simple and fast on the visible split.

## Known Limitations

- No UNSAT proof generation.
- Specialized to the recovered compact 24-puzzle encoding; unsupported structures return UNKNOWN.
- Search is bounded by the encoded transition count and a conservative wall-clock deadline. Found models are still checked against the original CNF before exit code 10.

## Changelog

- Initial scaffold replaced with a C++ solver.
- Added tools for CNF profiling and prototype search under `tools/`.
- Recovered the compact 24-puzzle encoding: blank row/column one-hot vectors, 24 tile-code slots, four deterministic move permutations, parity-dependent goal checks.
- Implemented structural detector, board decoder, IDA* search with Manhattan and linear conflict, action assignment, unit propagation, and complete CNF model verification.
- Updated metadata for broker submission.
