h48

A prototype for an optimal Rubik's cube solver, work in progress.
git clone https://git.tronto.net/h48
Download | Log | Files | Refs | README | LICENSE

commit 6ec2e7d5413eda0671a20a0069aa8d89d8117c0a
parent 1833e9c0ba37b90a5db84cecc66388d83f37d36a
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sat, 25 May 2024 18:07:07 +0200

Minor improvement

Diffstat:
MTODO.txt | 4++++
Msrc/solve_h48.h | 6+++---
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/TODO.txt b/TODO.txt @@ -1,3 +1,7 @@ +Correctness + - Check all cases of bitwise operations for type mismatch, + force cast to same type. Change to ULL where appropriate. + Solver - write a solver (how many tricks? some, but not all are needed) diff --git a/src/solve_h48.h b/src/solve_h48.h @@ -288,9 +288,9 @@ gendata_esep_bfs(bfsarg_esep_t *arg) set_esep_pval(arg->buf32, j, arg->depth); cc += x != arg->depth; cocsep_coord = j / H48_ESIZE(arg->h); - sim = arg->selfsim[cocsep_coord]; - for (t = 1; t < 48; t++) { /* Skip trivial trans */ - if (!(sim & (1ULL << t))) + sim = arg->selfsim[cocsep_coord] >> 1ULL; + for (t = 1; t < 48 && sim; t++, sim >>= 1ULL) { + if (!(sim & 1ULL)) continue; transd = transform(moved, t); k = coord_h48(transd, arg->cocsepdata, arg->h);