Another great success by Joona !
After 5876 games at 10"+0.1
Mod vs Orig: 1073 - 849 - 3954 ELO +13 (+- 5.2)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
}
// Step 19. Check for split
}
// Step 19. Check for split
- if ( !RootNode
- && !SpNode
&& depth >= Threads.min_split_depth()
&& bestValue < beta
&& Threads.available_slave_exists(pos.thread())
&& !StopRequest
&& !thread.cutoff_occurred())
Threads.split<FakeSplit>(pos, ss, &alpha, beta, &bestValue, depth,
&& depth >= Threads.min_split_depth()
&& bestValue < beta
&& Threads.available_slave_exists(pos.thread())
&& !StopRequest
&& !thread.cutoff_occurred())
Threads.split<FakeSplit>(pos, ss, &alpha, beta, &bestValue, depth,
- threatMove, moveCount, &mp, PvNode);
+ threatMove, moveCount, &mp, NT);
}
// Step 20. Check for mate and stalemate
}
// Step 20. Check for mate and stalemate
memcpy(ss, tsp->ss - 1, 4 * sizeof(SearchStack));
(ss+1)->sp = tsp;
memcpy(ss, tsp->ss - 1, 4 * sizeof(SearchStack));
(ss+1)->sp = tsp;
+ if (tsp->nodeType == Root)
+ search<SplitPointRoot>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
+ else if (tsp->nodeType == PV)
search<SplitPointPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
search<SplitPointPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
+ else if (tsp->nodeType == NonPV)
search<SplitPointNonPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
assert(threads[threadID].state == Thread::SEARCHING);
search<SplitPointNonPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
assert(threads[threadID].state == Thread::SEARCHING);
template <bool Fake>
void ThreadsManager::split(Position& pos, SearchStack* ss, Value* alpha, const Value beta,
Value* bestValue, Depth depth, Move threatMove,
template <bool Fake>
void ThreadsManager::split(Position& pos, SearchStack* ss, Value* alpha, const Value beta,
Value* bestValue, Depth depth, Move threatMove,
- int moveCount, MovePicker* mp, bool pvNode) {
+ int moveCount, MovePicker* mp, int nodeType) {
assert(pos.is_ok());
assert(*bestValue >= -VALUE_INFINITE);
assert(*bestValue <= *alpha);
assert(pos.is_ok());
assert(*bestValue >= -VALUE_INFINITE);
assert(*bestValue <= *alpha);
splitPoint.threatMove = threatMove;
splitPoint.alpha = *alpha;
splitPoint.beta = beta;
splitPoint.threatMove = threatMove;
splitPoint.alpha = *alpha;
splitPoint.beta = beta;
- splitPoint.pvNode = pvNode;
+ splitPoint.nodeType = nodeType;
splitPoint.bestValue = *bestValue;
splitPoint.mp = mp;
splitPoint.moveCount = moveCount;
splitPoint.bestValue = *bestValue;
splitPoint.mp = mp;
splitPoint.moveCount = moveCount;
}
// Explicit template instantiations
}
// Explicit template instantiations
-template void ThreadsManager::split<false>(Position&, SearchStack*, Value*, const Value, Value*, Depth, Move, int, MovePicker*, bool);
-template void ThreadsManager::split<true>(Position&, SearchStack*, Value*, const Value, Value*, Depth, Move, int, MovePicker*, bool);
+template void ThreadsManager::split<false>(Position&, SearchStack*, Value*, const Value, Value*, Depth, Move, int, MovePicker*, int);
+template void ThreadsManager::split<true>(Position&, SearchStack*, Value*, const Value, Value*, Depth, Move, int, MovePicker*, int);
const Position* pos;
Depth depth;
Value beta;
const Position* pos;
Depth depth;
Value beta;
int ply;
int master;
Move threatMove;
int ply;
int master;
Move threatMove;
template <bool Fake>
void split(Position& pos, SearchStack* ss, Value* alpha, const Value beta, Value* bestValue,
template <bool Fake>
void split(Position& pos, SearchStack* ss, Value* alpha, const Value beta, Value* bestValue,
- Depth depth, Move threatMove, int moveCount, MovePicker* mp, bool pvNode);
+ Depth depth, Move threatMove, int moveCount, MovePicker* mp, int nodeType);
private:
Thread threads[MAX_THREADS];
Lock mpLock;
private:
Thread threads[MAX_THREADS];
Lock mpLock;