Thinking During Adversary Time

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
fern
Posts: 8755
Joined: Sun Feb 26, 2006 4:07 pm

Thinking During Adversary Time

Post by fern »

This is an already old function of every engine: to think as the other side decides its move.
But although everybody of us knows about it since long time ago, how really function?
I wonder this because on a sudden I have been not so sure that the obvious answer is that the engine continue thinking on the basis we will play the move the engine consider best for us, which I assume means the last best move in his tree of analysis. So if the thread -in these days- has been so long a 20 moves, then the move number 20, our move, is the last one on whose ground the engine continue thinking.
Is this so?
If it is so, I wonder if then the engine put itself in a quandary as much the longest the line is, the more the chance it goes far an far of the theoretically best move. It must be so as much we consider engines as not playing yet a perfect chess.
I assume in a world of chess imperfection, the longest the line, the more the possible errors.
In any case, if it is NOT so and i am thinking old stuff already thought, would not be a better thing that then engine should not think in the best last move of the tree but in several?
If instead the engine would think, let say, 6 candidates moves to a reasonable deepness of 6 or 7 ply, I wonder if this would not a better way to handle the game that begin a new deep path with that last move which in turn is the fruit of a too long analysis.
Maybe this is to apply a common sense criteria where does not correspond. In life is better to be sure of a not too long line of analysis, but solid, than to venture a more progressively surrealistic long line.
Just a though from the sideline

Fern
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Thinking During Adversary Time

Post by bob »

fern wrote:This is an already old function of every engine: to think as the other side decides its move.
But although everybody of us knows about it since long time ago, how really function?
I wonder this because on a sudden I have been not so sure that the obvious answer is that the engine continue thinking on the basis we will play the move the engine consider best for us, which I assume means the last best move in his tree of analysis. So if the thread -in these days- has been so long a 20 moves, then the move number 20, our move, is the last one on whose ground the engine continue thinking.
Is this so?
If it is so, I wonder if then the engine put itself in a quandary as much the longest the line is, the more the chance it goes far an far of the theoretically best move. It must be so as much we consider engines as not playing yet a perfect chess.
I assume in a world of chess imperfection, the longest the line, the more the possible errors.
In any case, if it is NOT so and i am thinking old stuff already thought, would not be a better thing that then engine should not think in the best last move of the tree but in several?
If instead the engine would think, let say, 6 candidates moves to a reasonable deepness of 6 or 7 ply, I wonder if this would not a better way to handle the game that begin a new deep path with that last move which in turn is the fruit of a too long analysis.
Maybe this is to apply a common sense criteria where does not correspond. In life is better to be sure of a not too long line of analysis, but solid, than to venture a more progressively surrealistic long line.
Just a though from the sideline

Fern
About the only example I can give where the idea of pondering the best move from the previous search fails is this:

You start pondering, and at the one minute mark you get a massive fail high. There are two possibilities here...

(1) if you were not pondering this move, you would still find how good it is in just one minute, so you really don't stand any real chance of missing the move;

(2) If you see it at one minute, it is not unreasonable for your opponent to also see it and switch to a different move. So pondering something else at this point at least gives you a chance of saving some time while pondering where if you stick with the best move it is likely the opponent won't play it and you save nothing.

I did this very thing a couple of years ago, but in testing on my cluster, it did not help at all. I suppose the problem becomes "if the best move we found turns out to be no good, there are two cases."

(a) often there is NO move to save the day in such a position, so if you continue to ponder, you are likely right and will save time (that is not particularly important since you are walking into a big win anyway);

(b) how do you decide what to ponder? A quick search doesn't help a lot, even if you exclude the old ponder move from the quick search. I think this was the biggest problem when I tested.

Testing showed no effect whatsoever. I think because once you fail high significantly you are winning and time won't be such an issue, and if you use the modified algorithm a fail high guarantees you never save any time if the opponent plays the original expected move, and it makes it very difficult to ponder the right move since choosing the second best move is not easy...
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Thinking During Adversary Time

Post by hgm »

Engines either ponder in the position currently on the board (where you have the move) or (more common) speculate you will make the best reply (according to their previous search) to the move they just played, and start thinking from there. Unlike what you think they never speculate on more than a single move of the PV, no matter how deep the latter was. (Except for Grid Chess.)
User avatar
fern
Posts: 8755
Joined: Sun Feb 26, 2006 4:07 pm

Re: Thinking During Adversary Time

Post by fern »

That was my point, but probable not well explained. I Know engines think THE move they consider best and nothing else and I wondered if such was the best strategy.
Robert H answered that to me.

Fern
User avatar
Brunetti
Posts: 266
Joined: Tue Dec 08, 2009 1:37 pm
Location: Milan, Italy
Full name: Alex Brunetti

Re: Thinking During Adversary Time

Post by Brunetti »

fern wrote:I Know engines think THE move they consider best and nothing else
This is not correct, many engines search from the current position, thus considering all moves.
Anyway, the "consider only best move" strategy works fine, since a) often the move is actually played by the other engine, and b) even if it's not played, it probably will fit in the pv, so positions analyzed at high depths and populating the transposition table are useful anyway.
Indeed "transposition" is a perfect term: I think 1...Nf6 is good here and start analyzing. You play 1...Be7. Ok, now I analyze again, but many variations where you play 2...Nf6 (or 3...Nf6 and so on) are already in my tt, if I've already analyzed 1...Nf6 2.[mymove] Be7.


Alex
User avatar
fern
Posts: 8755
Joined: Sun Feb 26, 2006 4:07 pm

Re: Thinking During Adversary Time

Post by fern »

Thank you Alex.

Fern