chessforyou Bettina&Terry77
chessforyou Bettina&Terry77
chessforyou Bettina&Terry77
Would you like to react to this message? Create an account in a few clicks or log in to continue.

chessforyou Bettina&Terry77


 
HomeLatest imagesRegisterLog in
WELCOME TO FORUM OF Angels77 * named in memory of Bettina & Terry
Search
 
 

Display results as :
 
Rechercher Advanced Search
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Forum
Forum
Affiliates
free forum
 


Affiliates
free forum
 



 

 IanHoe( No move BUG fix ) code from Vlad0

Go down 
2 posters
AuthorMessage
Bettina
Admin
Admin
Bettina


Female Posts : 914
Reputation : 3742
Join date : 2009-11-27
Location : Bettina ( Sobel ? ) speakeasy 77>> Up All Night 77 >> Chelsea 77 >> little venice, maida vale 77 >> ???? Wendy D Green & Adnan Khashoggi know .... DO YOU ? £10,000.00 reward for information leading to me . but i am NOT here !

IanHoe( No move BUG fix ) code   from Vlad0 Empty
PostSubject: IanHoe( No move BUG fix ) code from Vlad0   IanHoe( No move BUG fix ) code   from Vlad0 EmptySat Sep 18, 2010 8:18 pm

newsflash newsflash newsflash
The first step in localizing the bug in engine's code was to determine
which UCI message of the engine causes GUI like Fritz to answer "no move".
I've found no info on the subj in Fritz help. But looking through the code I have found
one message: "bestmove NULL" in procedure OutputBestMove()
which is sent if the variable ROOT_BEST_MOVE==0. I supposed that just this message
have caused the GUI to give "no move" message.
Catching all messages from engine to GUI into a log file, I confirmed my guess.

The variable ROOT_BEST_MOVE is initialized in Search(POSITION) by 0. Then the execution
goes to MyTop(POSITION), where the move generator writes all legal moves from position POSITION
into loval array ML, from which they are copied into global array ROOT_MOVE_LIST.
It seems natural to reinitialize ROOT_BEST_MOVE in this place
by some of the legal moves, say ML[0]. When I did this, all "no moves" disappeared at once!
But the ML[0], though legal, hardly is the best even in the first
approximation! I checked consecutively, that copying of ML to
ROOT_BEST_MOVE is correct as well, so that ROOT_BEST_MOVE=ROOT_MOVE_LIST[0]
is OK. The array ROOT_MOVE_LIST is modified further by adding
to any move its evaluation (EVAL( move )). RB also are used for evaluation
of moves if position permits. I checked that all modification and
sorting procedures are correct, so the final "no move" fix
(with comments) is now:

#ifdef NO_MOVE_BUG_FIXHere is OK! I.e. ROOT_MOVE_LIST is correct up to here.
So take as the first approximation to ROOT_BEST_MOVE the best move of depth 1 instead of 0,
which creates "no bug", if the engine fails searching at bigger depth for some reason.
Taking into account that order in ROOT_MOVE_LIST is descending one gets:
ROOT_BEST_MOVE=POSITION->wtm?ROOT_MOVE_LIST->move:(list-1)->move;
#endif

placed immediately after bubble sort routine
and before the (first) line

L = -VALUE_MATE;

in MyTop() routine


http://ippolit.wikispaces.com/message/view/IvanHoe/27230721#27230825


I do not know why all comment signs // have disappeared from the above post! The essential (non-comment) is the only line:

ROOT_BEST_MOVE=POSITION->wtm?ROOT_MOVE_LIST->move:(list-1)->move;




tnx Vladimir brvo
butfly butfly butfly butfly butfly butfly butfly

_________________
IanHoe( No move BUG fix ) code   from Vlad0 EPG1y

Bettina  (Sobel ? )

speakeasy 77>> Up all Night 77 >>Chelsea 77 >> little venice 77 /Maida Vale >>>  ???? Wendy D Green  & Adnan Kashoggi know .... DO YOU  ? £2,000.00 reward for information leading to me . but i am NOT here !
Back to top Go down
https://morethanchessagame.forumotion.com
me4u
Admin
Admin
me4u


Male Posts : 819
Reputation : 2737
Join date : 2010-01-05
Location : Pugatory

IanHoe( No move BUG fix ) code   from Vlad0 Empty
PostSubject: Re: IanHoe( No move BUG fix ) code from Vlad0   IanHoe( No move BUG fix ) code   from Vlad0 EmptySun Sep 19, 2010 4:26 pm

newsflash



http://ippolit.wikispaces.com/message/view/IvanHoe/27230721#27246849
3 small notes.
1) The most adequate place for "no move" bug fix is immediately before depth search loop:
for (depth = 2; depth <= 250; depth += 2)
...
This has no practical consequances, because GUI will never demand to search mate position,
where the length of ROOT_MOVE_LIST iz 0 and
"no move" fix is forced to read this array at
outbound index -1. But it is better aestheticallly.

2)One can safely spare one iteration in bubble sort loop starting the loop as

for (p = list - 2; p >= ROOT_MOVE_LIST; p--)

(it makes no sense to sort subarray of length 1). Though practically neglegible, it is more
aesthetical.

3) I do not know, whether "no move" can occur
in analysis, but I posed the same bug fix in MyTopAnalysis() as well. Just for the case.

Vlad0

_________________
"No one is never ever truly  gone as long as you remember them "
Back to top Go down
 
IanHoe( No move BUG fix ) code from Vlad0
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
chessforyou Bettina&Terry77 :: ENGlNES :: ALL ENGlNES :: ENGlNES & CODES :: IvanHoe Engines and codes-
Jump to: