fix(solver): replace exponential IDDFS recursion with instantaneous heuristic simulation macros
This commit is contained in:
10
test/test_macros3.js
Normal file
10
test/test_macros3.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { DeepCube, MOVES } from '../src/utils/DeepCube.js';
|
||||
|
||||
let cube = new DeepCube();
|
||||
const apply = (str) => { str.split(' ').forEach(m => { cube = cube.multiply(MOVES[m]); }); };
|
||||
|
||||
cube = new DeepCube(); apply("F' U F");
|
||||
console.log("F' U F reverse puts piece 4 at pos:", cube.cp.indexOf(4), "ori:", cube.co[cube.cp.indexOf(4)]);
|
||||
|
||||
cube = new DeepCube(); apply("U' F' U F");
|
||||
console.log("U' F' U F reverse puts piece 4 at pos:", cube.cp.indexOf(4), "ori:", cube.co[cube.cp.indexOf(4)]);
|
||||
Reference in New Issue
Block a user