Author: martin fierz
Date: 08:39:55 12/03/03
Go up one level in this thread
On December 03, 2003 at 11:24:30, Robert Hyatt wrote: [snip] >My point was that how you check for input influences how you design your >basic engine. IE if it has to poll, you have to include code to do that >and the resulting spaghetti stuff to allow moves to be entered while a >search is in progress, without re-starting the search, etc... If you >decide to use a separate thread, then you have to decide how to handle >the engine thread. Ken Thompson simply started a search thread, and if >the expected move was made, he waiting for the result. If the wrong >move was made (not predicted) he just killed the search thread and started >a new one. if i decide today that i want to use a separate thread to handle the input (rather than the polling thing i'm doing now), it will take me a few hours to implement, perhaps a day if it gets bad. doing it in ken thompson's simple but rather effective way will definitely only take couple of hours. my "spaghetti stuff" is something like 5 lines of code in my alphabeta function, which took me a few minutes to write, plus a check at the end of the search which takes another couple of lines. >All of that influences how things will work. You don't necessarily have to >write all the code first, but you really ought to have an overall design of >how the system will operate, before _anything_ gets written. everybody knows that. nobody does it ;-) or if they do, they change the design later anyway. are you telling me you never changed anything in cray blitz or crafty?? >but you ought to have some idea of how you plan to handle >pondering, before you start, so that you don't start down a path that won't >work without lots of (later) modifications and debugging. i have a plan for that - and as i said i don't believe it will take much effort to implement. perhaps i'm underestimating the problem of course :-) i really think you ought to have a plan how to make the thing play a decent game. that seems by far more important than the relatively minor issue of pondering. and since i don't have a plan for that, i just go ahead and try... cheers martin
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.