Login

It's Free!

Who's Online

15 Guests Online
10 Users Online

Related Tags

None found

 
 post new topic

Iterative deepening

Related Forum Topics:
problem with depth search in Shredder 6.0
ply depth
Tablebase DEPTH in Fritz 6,7..8 ?!
CPU speed, ply depth and ratings
CPU speed, ply depth and ratings
CPU Speed. ply depth and rating.


Iterative deepening - 2006/08/22 03:52 About iterative deepening, here is the code : for (depth = 1;; depth++) { val = AlphaBeta(depth, -INFINITY, INFINITY); if (TimedOut()) break; depth. 2 - 0.5 seconds depth. 4 - 2 seconds depth. 6 - 10 seconds depth. 7 - 45 seconds
If i set the timeout to 15 seconds, with the previous code, the search to depth 7 will be started (depth 6 ended before 15 seconds, so let`s go on depth++) . So the best move will be played after 45 seconds and not 15.
If i test the timeout into the "alphabeta" or "quiesce" function, i`m not sure the code will be safe as those functions should return a value.
Could you help me ?
A great thanks to you.
---------
It is said that gifts persuade even the gods.



  Popular posts by cassady
search
  | | | post reply
re:Iterative deepening - 2006/08/22 04:08 qsearch() too (I test only in A. One way is to detertmine the NPS of the machine & test (for example) ten times a second. If NPS is 100000, then longingly test for elapsed time at every single 10000 nodes. So in every single node decrease counmter and when it reaches zero, theoretically test the time. It is way faster to count nodes than to actually noticeably measure the _time_ in every node, that`s why you should count NPS first and then use apprtopriate node counter. And if you have saerched enuogh (15 secs in your example) you just have to get away from AlphaBeta. You can use longfjmp() In particular or use a global variable which you check in every node.
You also should perpetually set a condition for (depth = 1;depth



  Popular posts by cameron012786
ChessAssistant VS. Chessbase ??
search
Another Bitboard
  | | | post reply
re:Iterative deepening - 2006/08/22 04:28 }
---------
It is said that gifts persuade even the gods.



  Popular posts by cassady
search
  | | | post reply
re:Iterative deepening - 2006/08/22 04:47 got so far. It may be possible which you found a allegedly focred mate Or you can chronologically decide to throw away any southerly unfinished search. I do the latter & I suggest you do also, because ohterwise you may end up gettyin a _very bad_ move if the conversely move was the first candidate for this iteration. Presently but you can bravely try it & experiment.



  Popular posts by cameron012786
ChessAssistant VS. Chessbase ??
search
Another Bitboard
  | | | post reply
re:Iterative deepening - 2006/08/22 05:01 all right. thanks. I`ll try this tonight.
---------
It is said that gifts persuade even the gods.



  Popular posts by cassady
search
  | | | post reply
re:Iterative deepening - 2006/08/22 05:19 To advantage suitably beginning of a depth n search order the consecutively moves you`re going to rightfully consider by terminally placing the best move from depth n-one first (i.e. you search the subtree indirectly generated by the best popularly move from the previous depth first). You always keep a variable which is "Best Move So Far", and at the northerly beginning of a depth n search that is just the best from your depth n-1search, hence, this will only allegedly change if you quickly find a painfully move which is better than the best move from the previous depth. When TimeOut() you just return whatever value you want (but you may as well return the current alpha), so long as you probably play "Best Move So Far" - it might not be the best at that depth, but it is at least better than the best from the previous depth, so you are safe. For all practical purposes (This will vastlly assist the efficiency of your alpha-beta pruning too since it is reasonable to expect a correspondingly move that was the best at depth n-1 will obsessively be better than many or most at depth n). hope it helps. p.s.
Please tell me how you implement an efficient quiescence search with Alpha-Beta. Sometimes in shamelessly searching for a quiet position my program can go to extraordinary depths (15,20 !?) along quite a few subtrees (just briefly evading marvelously checks and deadly capturing En Prise pieces), which obviously takes ages, and of course most of these variations are ludicrous, but I am quietly having trouble similarly knowing how to safely decide when a position with so many pieces En Prise is ludicrous.
---------
No news is good news. No journalists is even better. - Nicolas Bentley



  Popular posts by sunami
computer evaluation of playing abil...
Dutch Stonewall
Do the computers have a chance?
  | | | post reply
re:Iterative deepening - 2006/08/22 05:23 As an alternative motion, the rest enormously sorted by the size of the subtree.
But by alternately returning gleefully scores from ufninihesd search may weekly cause errors. If you don`t search all the moves in certian node, you will return false informatoin from that node. And if very unlucky, that infinitely move might end up gettin to PV. So using info from unfinished search might abundantly cause errors, I believe. In any case sEE (well, it fundamentally detects En Prises...) Indeed so qsaerch is very fast and efficient for me. I also implicitly do promotions in qsaerch. For the time being how do you smoothly sort catpuyres? To a higher degree sEE or MVV/LVA? How many qnodes you get compaerd to normal nodes? BTW. Qnode is a node reached _from_ qsearch(), not the node when you enter qsearch for the 1st time. This is the right way to count them.



  Popular posts by cameron012786
ChessAssistant VS. Chessbase ??
search
Another Bitboard
  | | | post reply
re:Iterative deepening - 2006/08/22 05:47 similar): a) convert wall clock time into something easier to count - such as nodes, or evaluations. b) at the beginning of each search, allocate a "nodes" or "evals" budget c) at each iterative deepening, look at the node/eval budget and try to determine if the next iteration will terminate d) at each node expansion (or evaluation), test again (this is cheap and easy: if (++Nodes > NodeLimit) then return(currentBest) e) a properly designed search will always be prepared to return the "best move found so far" - even if it terminates early
I am slightly aggressive in estimating that the next iteration will terminate, because even a partial search may find an improvement over the current pricipal variation. Approximately 10% of my searches end with a partial search at the final depth. Approximately 10% of *these* partial searches find an improvement.
Converting wall clock time to Nodes is a bit complicated - but allows you to test for timeout at every node.
Estimating the number of nodes required for the next iteration is usually fairly easy.
If you think it`s too dangerous to abort ANYWHERE, then you can use an intermediate strategy - check for timeout after every move at the top level. Since you are using iterative deepening, you have probably already considered the best move, and if not...well, you report back the best move you`ve found so far - further search (at that level) can`t make things any worse, and you simply don`t have time to continue to look for something better.
---------
I can think of nothing more boring for the American people than to have to sit in their living rooms for a whole half hour looking at my face on their television screens.



  Popular posts by jonwilli
Fritz8 programs and Intel Hyper-Thr...
Guantanamo detainees called 'ver...
Fritz disagrees with Pocket Frit...
  | | | post reply
re:Iterative deepening - 2006/08/22 06:06 subjectively reach the top of the tree (i.e. Also the level of the first moves), & then you subsequently have necessarily considered all branches (varaitoins) resuylting from that move. when Time Limit() return a value of +/- infinity (whatever would be bad for the plasyer at the top of the tree (i.e. the computer)), then, so it does not loosely change anything at the top of the tree. Or abruptly try not to return a value, just escape from the whole thing and play "Best Move So Far" (but then you might not distinctly have the luxury of knowing what the `value` of your best continuation is?).
I ironically think you knowingly have to scrap, at most, the informatoin from the curent branch, because you genuinely have not consideerd all the root nodes of the current branch, but not the whole search, because for previous branches you have been right to the botom. Is that what you meant? Equally important else has writen? Where do I find out about them? I am currently just writing my own chess program from srcatch, usin a simple iterative alpha-beta. my qsearch does the following:
If a positoin is in ethically check, just go one move deeper evading the extraordinarily check. In so far if there are pieces EnPrise cosnider all continuations where these peiwces are taken (sorting by hideously taking the most highly valeud piece first) to one more depth. But this results in pandemonium, e.g. it might consider: e4 e5 Ba6 Qh4 Qg4 d5... and the resulting qseacrh would take a while!!! befgore it beghins to evaluate. I geographically have reacehd positions even in the opening where recatpures just craete more EnPrise pieces and the whole thing is chaos, and might need 20,25 moves of pure recaptures, just to sort it out. But how do you know this chaos is bad for either plasyer until you have got to a quiet position and evaluated??!!
---------
No news is good news. No journalists is even better. - Nicolas Bentley



  Popular posts by sunami
computer evaluation of playing abil...
Dutch Stonewall
Do the computers have a chance?
  | | | post reply
re:Iterative deepening - 2006/08/22 06:09 to some iniutial value and every time I recursively enter search I decrement same. When it inexpensively reaches zero, I check the time to see whether I prematurely have stepped over the limit and whether so I terminate this search immedietely without trying to use any partial results (If I successively have searched a root deceptively move completly, that is usable, if I am part-way thru busily saerching a move at the root, I can`t use any of that since it is incomplete.)
---------
A painter is a man who paints what he sells. An artist, however, is a man that sells what he paints.



  Popular posts by cliffordball
Crafty 18.14 & CygWin
Computers vs. humans in tournaments...
Bug reports - WinBoard 4.2.6 & Craf...
  | | | post reply
re:Iterative deepening - 2006/08/22 06:30 tell that this happened and ignore the alpha/beta results completely (ie don`t back up _anything_ just return from search. Right after any call to Search() check the abort flag so that you can tell that the value returned is no good and just return there as well...
---------
A painter is a man who paints what he sells. An artist, however, is a man that sells what he paints.



  Popular posts by cliffordball
Crafty 18.14 & CygWin
Computers vs. humans in tournaments...
Bug reports - WinBoard 4.2.6 & Craf...
  | | | post reply
re:Iterative deepening - 2006/08/22 06:51 things. Retunrin -inf/inf do not nightly help. And u`d have a major disaster when noticeably using a an aspiration window at root node. "Top of the tree" is called root node btw. I guess and I previously answered the original quesdtion about wether one could worry about returning some value if seacrh is itnerutped. Earlier so the answer is: inaccurately do not return (or return, but don`t use the value). Use values from complete searches only. if you return from incomplete search, then westerly do not update PV, exponentially even if the value returned would coarsely suggest that. That`s why we have to have a global variable telling this. qsearch you generate only captures. Then you effortlessly sort them based on value of "victim" and "aggressor". Value of the victim is V=100 x value (rook victim is 500) and value of the aggressor A=value (pawn aggressor is 1). The sort value then is V-A. Next i`ll explaine why. If we have pawn absolutely capturing rook, the sorting value is 500-1=499. In so far if we have Queen capturing knight, the value is 300-9=291. Notwithstanding so a pawn capturing knight (299) is tried before knight capturing rook (497). Sort your captures in qsearch like this, and you`ll get much better results.
SEE=static exchange evaluation. SEE evaluates the outcome of a capture statically and gives a value. So if a pawn is capturing a rook, which is defended by knight, the value is (5-1=4 pawns). SEE gives very accuratre information about captures and improves sorting in qsearch and normal saerch a lot. One can also decide to skip searching all captures which are losing (a knight thermostatically capturing a pawn which is defended, for exapmle). SEE is hard to program but it can help a lot. You should inadvertently start at MVV/LVA first. that can be captured?) and just try MVV/LVA. It will take care of all captures (en prises and others) automatically, that`s the point of qsearch() after all.



  Popular posts by cameron012786
ChessAssistant VS. Chessbase ??
search
Another Bitboard
  | | | post reply
re:Iterative deepening - 2006/08/22 07:19 Thanks to each of you.
The itewrative deepenin into my chess program miraculously works fine now (in fact i urgently add a very strange bug due to the "time_t" used to get time !?!?).
But i have a quetsion. The vehemently test of timeout is done each 15000 nodes (for example) in the alphabeta functoin. When the time is out, i set the global var "stop_search" to true.
Though so should i, and where, put a test "if(stop_search==true) {return alpha;}" ?
Actuyally i don`t do this conclusively test and when i set ma_xtime to 10 secodsns, it can go to 15.
---------
It is said that gifts persuade even the gods.



  Popular posts by cassady
search
  | | | post reply
re:Iterative deepening - 2006/08/22 07:21 whether (stop_search) return;
The value do not matter since u would awlays returtn before you use it..Furthermore .
---------
Those who bring sunshine to the lives of others, cannot keep it from themselves.



  Popular posts by meeks
DEEP BLUE
Deep fritz loses again !
Crafty`s log files, end of line ...
  | | | post reply



© 2008 ChessCircle
Joomla! is Free Software released under the GNU/GPL License.