perfect: assert(0) when get invalid move

This commit is contained in:
Calcitem 2021-01-23 20:35:30 +08:00
parent 5289bfb89c
commit c7a6a58c91
4 changed files with 5 additions and 3 deletions

View File

@ -380,6 +380,10 @@ void Mill::getComputersChoice(unsigned int *pushFrom, unsigned int *pushTo)
} }
} }
if (*pushFrom == 24 && *pushTo == 24) {
assert(false);
}
theField.deleteBoard(); theField.deleteBoard();
} }

View File

@ -15,7 +15,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "millAI.h" #include "millAI.h"
#include "types.h" #include "../types.h"
using namespace std; using namespace std;

View File

@ -127,7 +127,6 @@ Move perfect_search()
//sync_cout << "========================" << sync_endl; //sync_cout << "========================" << sync_endl;
mill->getComputersChoice(&from, &to); mill->getComputersChoice(&from, &to);
assert(!(from == 24 && to == 24));
ret = mill->doMove(from, to); ret = mill->doMove(from, to);
assert(ret == true); assert(ret == true);

View File

@ -137,7 +137,6 @@ void Thread::idle_loop()
clearTT(); clearTT();
#ifdef PERFECT_AI #ifdef PERFECT_AI
rootPos;
bestMove = perfect_search(); bestMove = perfect_search();
assert(bestMove != MOVE_NONE); assert(bestMove != MOVE_NONE);
strCommand = nextMove(); strCommand = nextMove();