aboutsummaryrefslogtreecommitdiff
path: root/python/examples/solve.py
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-08-12 14:23:33 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-08-12 14:23:33 +0100
commit472bbefd98264fb8e82fd0876edec416052a57ca (patch)
treebe04707139a34511501ce8993ac1fb6c1379a0e7 /python/examples/solve.py
parentfac592f1ea6961c2dc8066a77679a6d0685db477 (diff)
parent80a412f31c18a2fdf1d56cf9ec817a1d1819de82 (diff)
downloadnissy-core-472bbefd98264fb8e82fd0876edec416052a57ca.tar.gz
nissy-core-472bbefd98264fb8e82fd0876edec416052a57ca.zip
Merge branch 'master' of tronto.net:nissy-core into windows
Diffstat (limited to 'python/examples/solve.py')
-rw-r--r--python/examples/solve.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/python/examples/solve.py b/python/examples/solve.py
index d77dd74..725c704 100644
--- a/python/examples/solve.py
+++ b/python/examples/solve.py
@@ -14,11 +14,13 @@ import nissy
14# Choose the solver you prefer 14# Choose the solver you prefer
15solver = "h48h0k4" 15solver = "h48h0k4"
16 16
17# Load the pruning table from file 17# Load the pruning table from file, generate it if needed
18data = bytearray(open("tables/" + solver, "rb").read()) 18datapath = "tables" + os.path.sep + solver
19 19if os.path.exists(datapath):
20# If you have not generated the table yet, you can do so: 20 data = bytearray(open(datapath, "rb").read())
21# data = nissy.gendata("h48h0k4") 21else:
22 data = nissy.gendata("h48h0k4")
23 print("Generated data will NOT be persisted")
22 24
23# Get a scrambled cube 25# Get a scrambled cube
24cube = nissy.applymoves(nissy.solved_cube, "U F R2"); 26cube = nissy.applymoves(nissy.solved_cube, "U F R2");

Generated with cgit - Back to sebastiano.tronto.net