Code: Select all
Move IterativeDeepning(size_t maxdepth)
{
//GenerateMoves
for (size_t d = 1; (d <= maxdepth) & !TimeManager::Stop() ; d++)
{
//Score&sortMoves
for (AllMoves)
{
MakeMove()
Score = -AlphaBeta(-beta, -alpha, d , true);//should i start with depth=1 , or depth=0 to descnd into qsearch first for a basic ordering ?!
UnMakeMove();
//.
//.
}
//output info
}
return BestMove;
}
Code: Select all
alphabeta
{
//Check for draw by insufficient material
//Check for draw by threefold repetition
//if depth == 0 qsearch
//check for ttCuts
//Do null move pruning
//generate,score,sort and search moves
:if(score>=beta) TTStore(Available[i], depthleft, BoundType::Lower, Score);
//Check for Checkmate and stalemate :if found : TTStore(Move(), depthleft, BoundType::Exact, Score);
//TTStore(mBest, depthleft,BoundType::Upper if no move raised alpha otherwise Exact, alpha);
}
2-should I check for 3-fold repetition at the root ?
3-should I be using the tt in anyway in the root-ID search ? and how ?
4-I found an old post by prof Hyatt in which he mentioned that "There is really nothing useful to be
gained by probing at ply=1" , does this mean that the first probe I do when alphabeta is called from root-ID function is completely useless ?
5-I intend to switch to Fail-Soft alphabeta , is there any special consideration that I should be aware of first ? I found the following in the wiki : "but might also require some care regarding to search instability issues in conjunction with transposition tables and various pruning-, reduction- and extension techniques." ?
6-what is the best move ordering to use at the root , and should the first round of ID be ordered differently ?