- std::string pv_info_to_uci(Position& pos, int depth, int selDepth,
- Value alpha, Value beta, int pvIdx);
- int64_t nodes;
- Value pv_score;
- Value non_pv_score;
- Move pv[PLY_MAX_PLUS_2];
- };
-
- // RootMoveList struct is just a vector of RootMove objects,
- // with an handful of methods above the standard ones.
- struct RootMoveList : public std::vector<RootMove> {
-
- typedef std::vector<RootMove> Base;
-
- void init(Position& pos, Move searchMoves[]);
- void sort() { insertion_sort<RootMove, Base::iterator>(begin(), end()); }
- void sort_multipv(int n) { insertion_sort<RootMove, Base::iterator>(begin(), begin() + n); }
-
- int bestMoveChanges;
- };
-
- // MovePickerExt template class extends MovePicker and allows to choose at compile
- // time the proper moves source according to the type of node. In the default case
- // we simply create and use a standard MovePicker object.
- template<bool SpNode, bool Root> struct MovePickerExt : public MovePicker {
-
- MovePickerExt(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss, Value b)
- : MovePicker(p, ttm, d, h, ss, b) {}
-
- RootMoveList::iterator rm; // Dummy, needed to compile
- };
-
- // In case of a SpNode we use split point's shared MovePicker object as moves source
- template<> struct MovePickerExt<true, false> : public MovePicker {
-
- MovePickerExt(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss, Value b)
- : MovePicker(p, ttm, d, h, ss, b), mp(ss->sp->mp) {}
-
- Move get_next_move() { return mp->get_next_move(); }
-
- RootMoveList::iterator rm; // Dummy, needed to compile
- MovePicker* mp;
- };
-
- // In case of a Root node we use RootMoveList as moves source
- template<> struct MovePickerExt<false, true> : public MovePicker {
-
- MovePickerExt(const Position&, Move, Depth, const History&, SearchStack*, Value);
- Move get_next_move();