On Tempo

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

chrisw
Posts: 4317
Joined: Tue Apr 03, 2012 4:28 pm

Re: On Tempo

Post by chrisw »

hgm wrote: Sun Aug 19, 2018 9:10 am I only see one personal attack here, though...

And a troll trying to put oil on the fire, without contributing a single word to the technical discussion.
I'm sorry you think that. I just try to be authentic, truthful and interesting. In this case, I felt that Ed had posted an informative chess programming post, but that he was hurt by some of the personal reactions, hurt enough to withdraw. I wanted to let him know he was not alone. I'm sorry if that is against your rules but I feel that what is right is more important that rules. That is all.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On Tempo

Post by hgm »

I was not saying you broke any rules, just observing that you made zero contribution to the technical content of this thread.

If you perceived any personal reactions versus Ed, you just have not been reading carefully. I only pointed out that I disagree with some of his claims, and why. If Ed feels insulted when not everyone takes all his claims for gospel, that is just his problem. That you sympathize with him on that might be understandable from examining your posting history, and in particular how you react to being withspoken...
chrisw
Posts: 4317
Joined: Tue Apr 03, 2012 4:28 pm

Re: On Tempo

Post by chrisw »

hgm wrote: Sun Aug 19, 2018 11:56 am I was not saying you broke any rules, just observing that you made zero contribution to the technical content of this thread.

If you perceived any personal reactions versus Ed, you just have not been reading carefully. I only pointed out that I disagree with some of his claims, and why. If Ed feels insulted when not everyone takes all his claims for gospel, that is just his problem. That you sympathize with him on that might be understandable from examining your posting history, and in particular how you react to being withspoken...

Not even wrong.

It was a skillfully put rhetorical question, designed only for expert chess programmers to get the meaning. It was an opportunity to stop there. But you treated it literally.

As to the rest of your post. Wrong. Wrong. Wrong. Wrong. Wrong. Wrong. Wrong. Wrong. And Wrong.

Okay, I can see you are in full-on insulting mode. Have a nice day.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: On Tempo

Post by Ras »

Rebel wrote: Sat Aug 18, 2018 9:49 pmthe idea to penalize King and Queen moves a little bit more than other moves in the middle game isn't even mine
That's not the point. The question is why the engine is tempted to move the queen around. I think it's because the queen doesn't have many squares available from d1/d8, and if mobility is part of the evaluation, it is tempting to move out the queen early so that it earns mobility points quickly.

However, that is usually not the best idea because the opponent can develop minor pieces while attacking the queen if the queen centralises, and if it doesn't, it gets stranded off the game. What I have added is scoring the queen's mobility considerably less during the first moves so that the engine sees more reward by increasing the mobility of the minor pieces and castling.

As for the king, I don't even see why it would move around. Reward safe position on the castling side and done. With one exception that I see occasionally, shuffling the king between g1 and h1 (resp. g8 and h8). That mostly happens in closed positions, and the problem isn't the king - it's that the engine doesn't develop an idea what to do. These positions are traditionally hard for computers anyway.
it comes from a respectable name in computer chess
Arguments at authority are a logical fallacy anyway - but when not even naming the authority, fallacy becomes farce.
Rasmus Althoff
https://www.ct800.net
User avatar
Eelco de Groot
Posts: 4565
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: On Tempo

Post by Eelco de Groot »

hgm wrote: Thu Aug 16, 2018 10:58 am
Rebel wrote: Wed Aug 15, 2018 6:24 pm I guess everybody has some sort of code dealing with the tempo penalty in eval. Basically I subtract 0.04 for pawn, knight, bishop and rook moves and 0.06 for queen and king moves in the middle game and no penalty at all in the endgame.
I don't get this. Eval scores positions, not moves. do you mean you do this in the incrementally upated part of the eval? That would not really be consistent, right? If you move back an forth a Rook you would end in the same position as when you moved back an forth a Queen, but with a better eval.

In CrazyWa (which is specifically designed for variants with piece drops) I use a side-to-move bonus which is calculate from the King safety of the opponent. This works amazigly well (given that it is the major King-Safety term).
Just wanted to congratulate Ed with an improvement of 5 Elo. That is really much for a single change and not many Improvements like that are found, going by the experience with Stockfish framework. Sometimes for multithreaded changes, but those are much rarer and of course not possible for Rebel. I hope Ed will come back here, I don't think HGm was deliberately annoying except maybe towards Chris.

I just think Ed's change is a penalty for not improving the position in case Rebel is just moving a piece around, without coordinating all the pieces. The moving aimlessly around is more likely if it is the same piece. In the opening it is of course a bonus for development of all the pieces, again for coordination. This fits in actually well with HGM's own theory that search should not just score (leaf-)positions, but also the tempo's needed to achieve this position. It is his own bl**dy theory :P In Stockfish this fits in somewhat with 'improvement'. The new change Ed found is I think a bit related to the fact that 'improvement' (in the part of search that is below alpha, so not good enough yet to reach alpha but the improvement might get it there), is mostly on the positional part of evaluation alone, not on the material part. This is for manoeuvering moves, not on tactical moves.

Also ties in a bit I think with discussion here in post in Fishcooking but that is not so important. So basically it is not so complicated an idea and Elo +5 for a supposed bugfix is probably very rare and hence unlikely, as Ed undoubtedly knows by now :) . There are no bugs in Rebel..
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On Tempo

Post by hgm »

chrisw wrote: Sun Aug 19, 2018 4:24 pmIt was a skillfully put rhetorical question, designed only for expert chess programmers to get the meaning. It was an opportunity to stop there. But you treated it literally.
A rhetorical question is a question to which the answer is obvious to everyone. Not a question to which the answer is only imagined to be obvious by the one who poses it, and wrong on top of it. Of course such 'rhetorical question' does not put a stop to anything.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On Tempo

Post by hgm »

Eelco de Groot wrote: Sun Aug 19, 2018 11:11 pm This fits in actually well with HGM's own theory that search should not just score (leaf-)positions, but also the tempo's needed to achieve this position. It is his own bl**dy theory :P
Note, however that this can not be achieved by penalizing just the path length to the leaf, as this is the same for every leaf (in a fixed-depth search) or arbitrarily determined by reductions and extensions. And I certainly see no reason to adapt a leaf score depending on the number of moves of a particular piece (the Queen) to reach it.