commit 472bbefd98264fb8e82fd0876edec416052a57ca
parent fac592f1ea6961c2dc8066a77679a6d0685db477
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Tue, 12 Aug 2025 14:23:33 +0100
Merge branch 'master' of tronto.net:nissy-core into windows
Diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/python/examples/solve.py b/python/examples/solve.py
@@ -14,11 +14,13 @@ import nissy
# Choose the solver you prefer
solver = "h48h0k4"
-# Load the pruning table from file
-data = bytearray(open("tables/" + solver, "rb").read())
-
-# If you have not generated the table yet, you can do so:
-# data = nissy.gendata("h48h0k4")
+# Load the pruning table from file, generate it if needed
+datapath = "tables" + os.path.sep + solver
+if os.path.exists(datapath):
+ data = bytearray(open(datapath, "rb").read())
+else:
+ data = nissy.gendata("h48h0k4")
+ print("Generated data will NOT be persisted")
# Get a scrambled cube
cube = nissy.applymoves(nissy.solved_cube, "U F R2");