![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: nullmove, qsearch, table, transposition, usage |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi!
I do not know how to correctly store scores into the TT, especially when it comes to q-search and nullmove. Is it true, that we can take the score we get, no matter if its from a "normal" search or a q-search and proceed the following way? Simplified and pseudo-code :-) int search(alpha, beta, depth) { flag = FLAG_UPPER; ... for all moves { MakeMove(); if(deep_enough) score = qsearch(-beta, -alpha); else score = search(-beta, -alpha, depth - 1); if(score alpha) { if(score = beta) { HashStore(depth, score, FLAG_LOWER); return score; } flag = FLAG_EXACT; alpha = score; } } TestMateOrStaleMate(); HashStore(depth, alpha, flag); } The "deep_enough" from above could be something like depth 1. And what about a null move search? Before testing any moves we test the null move. Can this be done in a similar manner as above? (Again simplified) .... if(deep_enough) score = qsearch(-beta, -alpha); else score = searchnull(-beta, -alpha, depth - 3); if(score = beta) { HashStore(depth, score, FLAG_LOWER); return score; } if(score alpha) { alpha = score; } // go on with the "real" moves .... And how would the "deep enough" be in that case? depth 3? And what about storing depth-1 or depth-2 in the TT in the fail-high case above, as in a certain sense it is not a depth-search? Thanks, -delphi- |
| Ads |
| Thread Tools | |
| Display Modes | |
|
|