God's Algorithm

Benchmark results

Full comparison of all 34 registered methods on 3×3×3, 4×4×4, 5×5×5. Five random scrambles per size (seeds 1–5), node cap 500,000, 1 threads for DD-*.

Cross-size comparison

Mean wall-clock and success rate for every method across all puzzle sizes.

Method3×3×34×4×45×5×5
MeanSuccessMeanSuccessMeanSuccess
algorithm-x0/50/5
astar31.4 s5/50/5
bdfs25 ms5/51.3 s5/5
bfs64.9 s1/50/5
dd-bfs70.0 s1/50/5
dd-dfs64.9 s1/50/5
dd-factor-sgd0/50/5
dd-mcts0/50/5
dd-som0/50/5
dd-tdr-zipper65.3 ms5/515.4 s5/5
dd-zipper45.9 ms5/510.4 s5/5
demaine127.4 s2/50/50/5
dfs0/50/5
dp75.6 s1/50/5
dp-bfs126.0 s2/50/5
exact-bfs74.6 s1/50/5
factor-bp0/50/5
factor-nmf0/50/5
factor-sgd0/50/5
fuzzy-pattern-db88.1 s1/50/5
ida0/50/5
irregular-astar59.3 s4/50/5
irregular-bfs69.2 s1/50/5
irregular-ida0/50/5
max-breadth-fs38.3 s1/50/5
mcts0/50/5
polytree-bfs91.1 s1/50/5
polytree-dfs0/50/5
randomized-bfs0/50/5
randomized-dfs0/50/5
som0/50/5
tdr-zipper85.3 ms5/515.0 s5/5
tour0/50/5
zipper58.3 ms5/510.2 s5/5

Mean wall-clock (ms)

3×3×3 · Five random scrambles per size (seeds 1–5; default length max(4, min(2n, 20)))

Loading chart…
Bar length = mean ms (successful runs only)Node cap 500,000

All methods · 3×3×3

MethodSuccessMeanMinMaxNotes
bdfs5/525 ms20.1 ms31.5 msoptimal
dd-zipper5/545.9 ms32.6 ms56.8 msoptimal
zipper5/558.3 ms39.4 ms72.3 msoptimal
dd-tdr-zipper5/565.3 ms50.8 ms77.3 msoptimal (ID)
tdr-zipper5/585.3 ms63.7 ms101.7 msoptimal (ID)
astar5/531.4 s1.1 s73.9 soptimal
max-breadth-fs1/538.3 s38.3 s38.3 soptimal
irregular-astar4/559.3 s1.2 s135.4 soptimal
dd-dfs1/564.9 s64.9 s64.9 soptimal
bfs1/564.9 s64.9 s64.9 soptimal
irregular-bfs1/569.2 s69.2 s69.2 soptimal
dd-bfs1/570.0 s70.0 s70.0 soptimal
exact-bfs1/574.6 s74.6 s74.6 soptimal
dp1/575.6 s75.6 s75.6 soptimal
fuzzy-pattern-db1/588.1 s88.1 s88.1 soptimal
polytree-bfs1/591.1 s91.1 s91.1 soptimal
dp-bfs2/5126.0 s77.2 s174.9 soptimal
demaine2/5127.4 s75.3 s179.6 soptimal
dfs0/5no solution
ida0/5no solution
tour0/5timeout
irregular-ida0/5no solution
polytree-dfs0/5no solution
randomized-bfs0/5no solution
mcts0/5suboptimal; no solution
dd-mcts0/5suboptimal; no solution
randomized-dfs0/5timeout
som0/5suboptimal; timeout
dd-factor-sgd0/5no solution
dd-som0/5suboptimal; timeout
factor-sgd0/5factorization; timeout
factor-bp0/5factorization; timeout
factor-nmf0/5positional-gram NMF; timeout
algorithm-x0/5no solution

Method catalog

High-level categories from the research paper — names only, no implementation details.

Optimal (Demaine)

demainedptourexact-bfs

Classical

bfsdfsastaridabdfsalgorithm-x

Irregular / beam

irregular-bfsirregular-astarirregular-idamax-breadth-fs

Randomized

randomized-bfsrandomized-dfs

Structured

polytree-bfspolytree-dfsdp-bfszipper

Parallel (DD)

dd-bfsdd-dfsdd-zipperdd-mctsdd-somdd-factor-sgddd-tdr-zipper

Heuristic / ML

fuzzy-pattern-dbmctssomfactor-sgdfactor-bpfactor-nmf

TDR Zipper

Configurable variant and reset policies

tdr-zipper

Takeaways

  • Benchmarks cover 34 methods on 3×3×3 (180 s wall, 500k nodes) and 4×4×4 (300 s wall), five random scrambles each, single-threaded execution.
  • The zipper family and BDFS are the reliability winners at these sizes: 5/5 success on both puzzles with optimal or near-optimal move counts where reported.
  • TDR zippers match classical zipper quality with modest overhead from tree-depth reset bookkeeping; dd-tdr-zipper parallelizes layer expansion.
  • Table-building methods (Demaine, exact-bfs, fuzzy-pattern-db) pay upfront precomputation; on 4×4×4 most never reached a solution before the node cap.
  • Heuristic and ML methods (MCTS, SOM, factor-sgd/bp/nmf) explore diverse paths but are exploratory baselines under default budgets on larger cubes.
  • Positional-gram NMF (factor-nmf) latency grows sharply with puzzle size; classical misplaced/pattern heuristics scale more predictably on 3×3×3.
  • Parallel deferred (DD) variants improve frontier throughput when width is high; on 3×3×3 sequential BDFS is often fastest.