mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Initialize SearchStack only once at RootMoveList c'tor
Just fix current ugly behaviour :-) No functional change Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
b75e68860c
commit
b5178597bd
1 changed files with 6 additions and 4 deletions
|
@ -2730,6 +2730,11 @@ namespace {
|
|||
StateInfo st;
|
||||
bool includeAllMoves = (searchMoves[0] == MOVE_NONE);
|
||||
|
||||
// Initialize search stack
|
||||
init_ss_array(ss, PLY_MAX_PLUS_2);
|
||||
ss[0].init();
|
||||
ss[0].eval = VALUE_NONE;
|
||||
|
||||
// Generate all legal moves
|
||||
MoveStack* last = generate_moves(pos, mlist);
|
||||
|
||||
|
@ -2745,11 +2750,8 @@ namespace {
|
|||
continue;
|
||||
|
||||
// Find a quick score for the move
|
||||
init_ss_array(ss, PLY_MAX_PLUS_2);
|
||||
ss[0].init();
|
||||
ss[0].eval = VALUE_NONE;
|
||||
ss[0].currentMove = cur->move;
|
||||
pos.do_move(cur->move, st);
|
||||
ss[0].currentMove = cur->move;
|
||||
moves[count].move = cur->move;
|
||||
moves[count].score = -qsearch<PV>(pos, ss+1, -VALUE_INFINITE, VALUE_INFINITE, Depth(0), 1);
|
||||
moves[count].pv[0] = cur->move;
|
||||
|
|
Loading…
Add table
Reference in a new issue