diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-17 10:50:57 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-17 14:36:27 +0200 |
| commit | 0ece4b72db22139db51e8f5f37c25f24c84f3e43 (patch) | |
| tree | fa9d0f5ec4124b2e51194ec6dc888e037b9da7e2 /python/examples/solve.py | |
| parent | 785f2859e336db49095a8443be8d204ba0989925 (diff) | |
| download | nissy-core-0ece4b72db22139db51e8f5f37c25f24c84f3e43.tar.gz nissy-core-0ece4b72db22139db51e8f5f37c25f24c84f3e43.zip | |
Small rework of optimal vs maxsols
I wanted to make the "optimal" and "maxsolutions" options mutually
exclusive, but in the end I decided there is value in keeping both
(e.g. for specifying a limit to the number of solutions when asking
for "all" optimal").
Now optimal cannot be negative anymore, for the same reason of maxsolutions.
The interface user (shell, UI) will have to take care of handling this
in a way that makes sense for the user. Usually this means setting
the maximum number of solutions to UINT_MAX (or a similar very high
number) when the user wants "all optimal".
Diffstat (limited to 'python/examples/solve.py')
| -rw-r--r-- | python/examples/solve.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/examples/solve.py b/python/examples/solve.py index b939183..a60c432 100644 --- a/python/examples/solve.py +++ b/python/examples/solve.py | |||
| @@ -23,7 +23,7 @@ data = bytearray(open("tables/" + solver, "rb").read()) | |||
| 23 | cube = nissy.applymoves(nissy.solved_cube, "U F R2"); | 23 | cube = nissy.applymoves(nissy.solved_cube, "U F R2"); |
| 24 | 24 | ||
| 25 | # Solve! | 25 | # Solve! |
| 26 | solutions = nissy.solve(cube, solver, nissy.nissflag_normal, 0, 9, 3, -1, 4, data) | 26 | solutions = nissy.solve(cube, solver, nissy.nissflag_normal, 0, 9, 3, 20, 4, data) |
| 27 | 27 | ||
| 28 | # Print the solutions, one per line | 28 | # Print the solutions, one per line |
| 29 | print("Found ", len(solutions), " solutions:") | 29 | print("Found ", len(solutions), " solutions:") |
