a question about Stockfish Cowardness

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

Moderator: Ras

User avatar
GenoM
Posts: 914
Joined: Wed Mar 08, 2006 9:46 pm
Location: Plovdiv, Bulgaria
Full name: Evgenii Manev

a question about Stockfish Cowardness

Post by GenoM »

Hi

I tried to mess up with settings of Stockfish. With Cowardness set up to Max (200) Stockfish 2.3 is showing some very strange results (~+100 points compared to default settings). The sample is small, so I would like to ask some of you to try this setting and to share results here.

Thanks.

PS: here is some excerpt from my home-made list to show why i'm calling results of Stockfish 2.3 Coward "strange" :) All games are blitz with increment played under Arena GUI with book of GM games set to 5-8 moves.

Code: Select all

Rank Name                           Elo    +    -  games score oppo. draws 
   3 Robbodini 1.1                  3094   78   71   106   86%  2688   19% 
   5 Stockfish 130719               3064  190  150    24   90%  2663   13% 

   7 Stockfish 2.3 Coward           3031   90   82    75   85%  2675   21% 

   9 Houdini 1.5a                   3028   41   40   220   68%  2869   34% 
  10 Critter 1.6a                   3020   45   44   206   74%  2780   33% 
  11 Strelka 5.5                    3017   42   41   221   70%  2840   36% 
  12 Critter 1.4                    3011   70   67    99   78%  2685   29% 

  28 Stockfish 2.3                  2944   75   72    73   73%  2705   37% 
take it easy :)
User avatar
GenoM
Posts: 914
Joined: Wed Mar 08, 2006 9:46 pm
Location: Plovdiv, Bulgaria
Full name: Evgenii Manev

Re: a question about Stockfish Cowardness

Post by GenoM »

Noone interested?
take it easy :)
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: a question about Stockfish Cowardness

Post by zullil »

GenoM wrote:Noone interested?
Well, I did read your post. :D

My thoughts were:

1) He's testing an old version of Stockfish.

2) His sample is small.

3) He's using blitz games.

4) The Stockfish developers did extensive testing to find the best (default) setting for the Cowardice parameter.

But maybe Marco or someone else will comment further.
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: a question about Stockfish Cowardness

Post by shrapnel »

GenoM wrote:Noone interested?
I suppose Cowardice at Max is equivalent to Houdini 3 at Contempt 0 ; similar to Houdini 3 at Contempt 0 having a higher ELO rating than Houdini at default Contempt 1.
Read somewhere that the default settings of most top Engines are deliberately set at slightly aggressive levels...more wins mean more attractive to the buyer. But this is not necessarily the strongest setting.
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: a question about Stockfish Cowardness

Post by zullil »

shrapnel wrote:
GenoM wrote:Noone interested?
I suppose Cowardice at Max is equivalent to Houdini 3 at Contempt 0
Quite unlikely, since Stockfish has a separate Contempt Factor parameter. Now I'm curious enough to look at the source code ...

[EDIT] It seems that the Cowardice parameter affects how much weight the engine places on the safety of its own king.
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: a question about Stockfish Cowardness

Post by shrapnel »

zullil wrote:
shrapnel wrote:
GenoM wrote:Noone interested?
I suppose Cowardice at Max is equivalent to Houdini 3 at Contempt 0
Quite unlikely, since Stockfish has a separate Contempt Factor parameter. Now I'm curious enough to look at the source code ...

[EDIT] It seems that the Cowardice parameter affects how much weight the engine places on the safety of its own king.
On the contrary, quite likely, as Cowardice and Contempt 0 are quite alike ( they almost mean the same thing, in this context ! ) and Houdini 3 does NOT have a separate Cowardice factor !! So, I think that one can safely assume that the Cowardice factor is DEFINITELY factored in, in Houdini's version of Contempt ! :)
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: a question about Stockfish Cowardness

Post by zullil »

shrapnel wrote:
zullil wrote:
shrapnel wrote:
GenoM wrote:Noone interested?
I suppose Cowardice at Max is equivalent to Houdini 3 at Contempt 0
Quite unlikely, since Stockfish has a separate Contempt Factor parameter. Now I'm curious enough to look at the source code ...

[EDIT] It seems that the Cowardice parameter affects how much weight the engine places on the safety of its own king.
On the contrary, quite likely, as Cowardice and Contempt 0 are quite alike ( they almost mean the same thing, in this context ! ) and Houdini 3 does NOT have a separate Cowardice factor !! So, I think that one can safely assume that the Cowardice factor is DEFINITELY factored in, in Houdini's version of Contempt ! :)
I think you're essentially wrong here. Contempt influences an engine's willingness to accept a draw. Not closely related to Stockfish's cowardice, which is about safety of the engine's king. But perhaps an expert can clarify.
User avatar
Eelco de Groot
Posts: 4684
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: a question about Stockfish Cowardness

Post by Eelco de Groot »

zullil wrote:
shrapnel wrote:
zullil wrote:
shrapnel wrote:
GenoM wrote:Noone interested?
I suppose Cowardice at Max is equivalent to Houdini 3 at Contempt 0
Quite unlikely, since Stockfish has a separate Contempt Factor parameter. Now I'm curious enough to look at the source code ...

[EDIT] It seems that the Cowardice parameter affects how much weight the engine places on the safety of its own king.
On the contrary, quite likely, as Cowardice and Contempt 0 are quite alike ( they almost mean the same thing, in this context ! ) and Houdini 3 does NOT have a separate Cowardice factor !! So, I think that one can safely assume that the Cowardice factor is DEFINITELY factored in, in Houdini's version of Contempt ! :)
I think you're essentially wrong here. Contempt influences an engine's willingness to accept a draw. Not closely related to Stockfish's cowardice, which is about safety of the engine's king. But perhaps an expert can clarify.
No expert if you look at my occasional games but I think Anil is not so wrong here even if for the simple fact that with these two parameters you change the style of play for Stockfish and Stockfish takes less risk with high cowardice. That is exactly what a human player would do if he thought the opponent would start making mistakes on his own without going into very sharp battles. Or in the case of a stronger opponent would be satisfied with a draw and play as solidly as possible. If you think your opponent calculates deeper than you, going into a king attack may backfire. Never going for the attack will not win you many games either so a cowardice of 200 I don't know if that is good even against Houdini :o ...

Aggressiveness doubles as Stockfish' contempt against weaker oppponents especially. It is one of the reasons in my opinion why we have a hard time showing elo gains for Stockfish version of contempt against SF 3 at least. The two terms Aggressiveness and Cowardice do make evaluation asymmetrical for the two sides in the game which should not work maybe, theoretically, but inderectly they also make search asymmetrical. Richard Lang could tell you that asymmetrical search can work at leat it did work extremely well in the time of Chess Genius before nullmove etc. Curiously though I do not know of many other examples of programs that do this (apart from Stockfish now, a little bit, because of these asymmetric evals).

Regards, Eelco
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
syzygy
Posts: 5801
Joined: Tue Feb 28, 2012 11:56 pm

Re: a question about Stockfish Cowardness

Post by syzygy »

Just see here:
Contempt = 0: symmetric evaluation.
Contempt = 1: piece value imbalance.
Contempt = 2: piece value imbalance and king safety imbalance.
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: a question about Stockfish Cowardness

Post by shrapnel »

syzygy wrote:Just see here:
Contempt = 0: symmetric evaluation.
Contempt = 1: piece value imbalance.
Contempt = 2: piece value imbalance and king safety imbalance.
Bingo ! Proves my point completely that Cowardice is factored in, in Houdini's Contempt.
Thank You, Ronald ! :)
Also, I'm getting very good results with the Cowardice maxed out in the latest Stockfish development version, in my online games ! ( Of course, nothing I can prove by the exacting standards of the folk here ! )
I think you are right about the asymmetric search business...seems to be working positively for Stockfish, at least so far.
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis