nissy-classic

Stable branch of nissy
git clone https://git.tronto.net/nissy-classic
Download | Log | Files | Refs | README | LICENSE

commit 5ca725cdd08814791bd57f30e5066d63cc7babc1
parent 40352f018b29e8aea9a804dd1240ea8374c39db8
Author: Sebastiano Tronto <sebastiano.tronto@gmail.com>
Date:   Mon, 27 Jul 2020 15:29:13 +0200

Fixed a bug with NISS

Diffstat:
M.gitignore | 2+-
Mnissy | 0
Msrc/solver.c | 8+++++++-
3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,3 +1,3 @@ backup -src/dbg_compile.sh +dbg_compile.sh TODO diff --git a/nissy b/nissy Binary files differ. diff --git a/src/solver.c b/src/solver.c @@ -66,6 +66,8 @@ void niss_eo_dfs(int eo, int scramble[], int eo_list[][30], int *eo_count, } } + if (*eo_count >= m) + return; eo_list[*eo_count][moves] = 0; /* If not nissing already and we either have not done any move yet or @@ -152,6 +154,8 @@ void niss_dr_from_eo_dfs(int co, int epos, int scramble[], int eo_moves[30], } } + if (*dr_count >= m) + return; dr_list[*dr_count][moves] = 0; /* If not nissing already and we either have not done any move yet or @@ -296,13 +300,15 @@ void niss_htr_from_dr_dfs(int cp, int eo3, int scramble[], int eodr_moves[30], } } + if (*htr_count >= m) + return; htr_list[*htr_count][moves] = 0; /* If not nissing already and we either have not done any move yet or * the last move was a quarter turn and I am allowed to niss, try niss! */ if (!niss && last1 % 3 != 2 && can_use_niss && !(hide && moves > 0 && - (last1 % 3 == 0 || (parallel(last1, last2) && last2 % 3 == 0)))) + (last1 % 3 == 0 || (parallel(last1, last2) && last2 % 3 == 0)))) niss_htr_from_dr_dfs(premoves_inverse(htr_list[*htr_count], scramble, eodr_moves, cp_transition_table), premoves_inverse(htr_list[*htr_count], scramble,