Add IDA* solver with permutation and orientation PDBs

Closed
JA
1mo ago
+1020-0

Added PDB generator and 729-entry table.
Added non-recursive IDA* solver; the heuristic uses the maximum value from the two tables.


Summary by cubic

Adds an IDA* solver for the 2x2x2 Rubik's cube backed by two pattern databases (PDBs): one for corner permutations (5040 states) and one for orientations (729 states). The heuristic returns the maximum of the two table lookups.

  • build_pdb.c and build_pdb_orientation.c generate both PDB tables as C headers via BFS, with the orientation builder validating distance consistency and move invariants.
  • ida_solver.c implements a non-recursive IDA* search that prunes consecutive moves on the same face and caps depth at 11.
  • Includes tests for solved, one-move, twisted-corner, and distance-11 states, plus orientation rank round-trip verification.
  • memory_probe.s measures stack headroom on RV32I; .gitignore now skips .exe files.