hgm wrote:I guess it depends on what your threshold is for calling something complex. Search will obviously never be as simple as a "hello world" program.
Aborting the search never struck me as a problem. I just have a global 'abortFlag', and I test it directly after UnMake() to do an instant return when it is set. In King Slayer/Simple the abortFlag is only set if the search time exceeds the 'panic' limit, which is probed every 1024 nodes to not loose too much time on clock reading.
Another argument why functional programming is not practical.
Although with parallel tasks global variables give problems.
hgm wrote:True, but that is order of importance, which doesn't necessarily coincide with temporal order. If you start with a slow design that uses crummy algorithms, you might have painted yourself in a corner by the time you get to the speed part, and need to rewrite so much that you might as well start over again.
But you have a less detailed specification. Although it may be useless if you can't transform it into a very efficient one if necessary of course.
hgm wrote:I guess it depends on what your threshold is for calling something complex. Search will obviously never be as simple as a "hello world" program.
Aborting the search never struck me as a problem. I just have a global 'abortFlag', and I test it directly after UnMake() to do an instant return when it is set. In King Slayer/Simple the abortFlag is only set if the search time exceeds the 'panic' limit, which is probed every 1024 nodes to not loose too much time on clock reading.
At this moment I already count eleven variables that affect behavior of best move search. So I don't think search is simple.
I looked a bit on what there's to work on in my chess engine.
I read for example https://chessprogramming.wikispaces.com ... Extensions and I have a question. Currently I'm processing all capture-moves in quiescence search. Am I right that this may be a bit overdoing it? And that the wikipage mentioned tells me that I only need to do recaptures?
flok wrote:I looked a bit on what there's to work on in my chess engine.
I read for example https://chessprogramming.wikispaces.com ... Extensions and I have a question. Currently I'm processing all capture-moves in quiescence search. Am I right that this may be a bit overdoing it? And that the wikipage mentioned tells me that I only need to do recaptures?
That's indeed overdoing it, this will take an enormous amount of time.
You only have to consider captures that will lift your score above alpha.
Therefore it is useless to try captures with a negative see.
all captures is almost certainly overdoing it. recaptures only might be underdoing it but would certainly cover the most common cases of why qsearch is needed (avoiding ending every line with the side to move eating the biggest piece on the board they can)
the low hanging fruit to skip:
bad captures (Qxprotected pawn at the extreme, SEE < 0 in general)
futile captures (when you're down by 3pts compared to alpha, taking a pawn is still going to fail low because the opponent will be allowed to stand pat immediately so you can avoid processing the move)
* First hash move, even if it's a quiet move.
* Then promotions to queen + captures without bad SEE ones and without futile ones.
* Then checks (in first quiescence call).
From the 5th level of quiescence I do only recaptures.