Skip to content

Add IDA* solver with permutation and orientation PDBs - #2

Closed
JackChang92318 wants to merge 8 commits into
sysprog21:mainfrom
JackChang92318:feature/ida-solver
Closed

JackChang92318 wants to merge 8 commits into
sysprog21:mainfrom
JackChang92318:feature/ida-solver

Conversation

@JackChang92318

@JackChang92318 JackChang92318 commented Oct 4, 2026 •

Copy link
Copy Markdown

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.

Written for commit e895177. Summary will update on new commits.

Review in cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant