perfect: assert(0) when get invalid move
This commit is contained in:
parent
5289bfb89c
commit
c7a6a58c91
|
@ -380,6 +380,10 @@ void Mill::getComputersChoice(unsigned int *pushFrom, unsigned int *pushTo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*pushFrom == 24 && *pushTo == 24) {
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
|
|
||||||
theField.deleteBoard();
|
theField.deleteBoard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue