Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cubing/search/inside/solve/twsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface TwsearchOptions {
targetPattern?: KTransformationData;
minDepth?: number;
maxDepth?: number;
quantumMetric?: boolean;
}

export async function wasmTwsearch(
Expand Down
3 changes: 2 additions & 1 deletion src/cubing/search/outside.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import type { PrefetchLevel } from "./inside/api";
import { randomClockScrambleString } from "./inside/solve/puzzles/clock"; // TODO: don't reach into `inside` code.
import type { TwsearchOptions } from "./inside/solve/twsearch";
import {
type InsideOutsideAPI,
instantiateWorker,
mapToAllWorkers,
type InsideOutsideAPI,
} from "./instantiator";

let cachedWorkerInstance: Promise<InsideOutsideAPI> | undefined;
Expand Down Expand Up @@ -119,6 +119,7 @@ export interface SolveTwsearchOptions {
generatorMoves?: string[];
startPattern?: KPattern;
minDepth?: number;
quantumMetric?: boolean;
}

export async function solveTwsearch(
Expand Down
2 changes: 1 addition & 1 deletion src/cubing/vendor/mpl/twsearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ var twsearch_wasm_default = __wbg_init;
var cachedInitWrapper;
async function initWrapper() {
await (cachedInitWrapper ??= (async () => {
const wasmUint8Array = (await import("./twsearch_wasm_bg-BXMNNHLU.js")).default;
const wasmUint8Array = (await import("./twsearch_wasm_bg-FNRELPF3.js")).default;
await twsearch_wasm_default(wasmUint8Array.buffer);
})());
}
Expand Down
3 changes: 0 additions & 3 deletions src/cubing/vendor/mpl/twsearch/twsearch_wasm_bg-BXMNNHLU.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/cubing/vendor/mpl/twsearch/twsearch_wasm_bg-FNRELPF3.js
Git LFS file not shown
15 changes: 15 additions & 0 deletions src/sites/experiments.cubing.net/cubing.js/stub/stub.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
// Stub file for testing.
// Feel free to add code here if you need a quick place to run some code, but avoid committing any changes.

import { cube2x2x2 } from "cubing/puzzles";
import { experimentalSolveTwsearch } from "cubing/search";

const kpuzzle = await cube2x2x2.kpuzzle();
const pattern = kpuzzle.defaultPattern().applyAlg("L2 F' U' F L2 F2");

console.log(
(
await experimentalSolveTwsearch(kpuzzle, pattern, {
generatorMoves: ["U", "F", "R"],
quantumMetric: true,
})
).toString(),
);