Cfish in practice and question

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

Moderators: hgm, Rebel, chrisw

Eduard
Posts: 1439
Joined: Sat Oct 27, 2018 12:58 am
Location: Germany
Full name: N.N.

Cfish in practice and question

Post by Eduard »

Today some games with Cfish played on playchess. Reason: Cfish is little bit faster than Stockfish on my slow hardware.

I always play with contempt = 0 because the opponents have much faster hardware.

In the following case Cfish had to play with 2 cores against 11 cores. Still, Cfish had a good chance of a draw. About 70% of playchess will be decided by the opening book and only 30% by the hardware! And so the game also ended in a draw. But! It was a blitz game! The engines have little time left, only a few seconds! Anyone would spend less time, the quickest way to draw, right? But unfortunately not that stupid fish! Sorry.

I had set contempt = 0, what else should I do?

2 cores against 11! in only 5 seconds. Who will win there? None! But only if the weak force the draw quickly. But Cfish always wanted to play a different draw variant.

That was not fundamentally wrong. But if in the end the naked king stands against king and pawn :roll: , then that is wrong! When time runs out, you lose. But if the opponent of a pawn has, time runs out, it is a draw!

Therefore, I do not understand why such things are not considered when programming?

SolistaChess,Cfish - Vimtiroba,S 1/2-1/2, Wertungspartie, 5 min 2019
[d]6k1/5p2/4p3/8/P2P1P1Q/1p1K4/3B4/3q4 w - - 0 1

With only few seconds on the clock, Cfish played here Qg3+:

Analysis by Cfish 190119 64:
65.Qg3+ Kh7 66.Qh2+ Kg7 67.Qg2+ Kh8 68.Qh3+ Kg7 69.f5 b2 70.f6+ Kxf6 71.Qh4+ Kg7 72.Qg3+ Kh7 73.Qh2+ Kg7
= (0.00) Tiefe: 34/18 00:00:09 30630kN, tb=129564

Only 5 seconds on my clock:

[d]7k/5p2/8/5p2/P7/4Q3/5K2/1q6 w - - 0 1

Analysis by Cfish 190119 64:
84.a5 Qa2+ 85.Kg3 Kh7 86.Qb6 Qa3+ 87.Kf4 Qd3 88.Qe3 Qc2 89.Qd4 f6 90.a6 Qc1+ 91.Kxf5 Qf1+ 92.Ke4 Qxa6
= (0.00) Tiefe: 43/18 00:00:05 17137kN, tb=220551)

This move losed a pawn. Oh no!

[d]8/5pk1/8/5K2/8/8/8/8 b - - 0 1

and here black played in this blitzgame to the end! why not? He can never lose anymore. Here can only lose White (on time).

Here's the game, I was lucky once again. But unhappy!

Code: Select all

[Event "Wertungspartie, 5 min"]
[Site "Maschinenraum"]
[Date "2019.01.31"]
[Round "?"]
[White "SolistaChess, Cfish 190119 64"]
[Black "Vimtiroba, SF10''Bishop''v8"]
[Result "1/2-1/2"]
[ECO "E08"]
[WhiteElo "2369"]
[BlackElo "2503"]
[Annotator "0.31;0.00"]
[PlyCount "214"]
[EventDate "2019.01.31"]
[SourceTitle "playchess.com"]
[TimeControl "300"]

{SF10''Bishop''v8 (11 threads): 34.1 plies; 20.403kN/s Intel(R) Core(TM)
i7-8700K CPU @ 3.70GHz 3696MHz, (6 cores, 12 threads), Corr2019.ctg, 64 MB} 1.
d4 {B 0} d5 {B 0} 2. Nf3 {B 0} e6 {B 0} 3. c4 {B 0} Nf6 {B 0} 4. g3 {B 0} Bb4+
{B 0} 5. Bd2 {B 0} Be7 {B 0} 6. Bg2 {B 0} Nbd7 {B 0} 7. O-O {B 0} O-O {B 0} 8.
Qc2 {B 0} c6 {B 0} 9. Bf4 {B 0} b6 {B 0} 10. Rd1 {B 0} Bb7 {B 0} 11. Ne5 {B 0}
Nh5 {B 0} 12. Bd2 {B 0} Nhf6 {B 0} 13. cxd5 {B 0} cxd5 {B 0} 14. Nc6 {B 0} Bxc6
{B 0} 15. Qxc6 {B 0} Rc8 {B 0} 16. Qb5 {B 0} Nb8 {B 0} 17. Nc3 {B 0} a6 {
0.00/32 17} 18. Qd3 {B 0} b5 {0.00/32 2} 19. e3 {B 0 (a4)} Nc6 {-0.17/28 5} 20.
a4 {B 0 (a3)} b4 {0.00/27 6} 21. Ne2 {B 0} Qb6 {0.06/31 13} 22. Rac1 {B 0} Bd6
{0.00/31 24} 23. Bf1 {B 0 (b3)} Rc7 {0.00/27 13} 24. Nf4 {0.31/25 21} Ra8 {
-0.04/31 0} 25. f3 {0.24/25 25} Qa7 {0.00/32 0 (h6)} 26. Rc2 {0.00/29 16 (Be1)}
a5 {-0.18/27 4} 27. Rdc1 {0.00/29 0} Ne7 {-0.21/27 3} 28. Rxc7 {0.00/30 5} Bxc7
{-0.09/29 2} 29. Be1 {0.13/29 34 (Ne2)} Rc8 {-0.13/30 17} 30. Nh3 {0.13/26 0 
(Bf2)} Qb8 {-0.09/29 10 (Bd6)} 31. Qb5 {0.13/27 11} h5 {-0.08/33 0} 32. Kg2 {
0.00/28 7 (Qxb8)} Bb6 {-0.25/27 4} 33. Rxc8+ {0.00/26 0} Nxc8 {-0.10/32 8} 34.
Bf2 {0.00/29 0} Qc7 {-0.19/31 7} 35. Qe2 {0.00/29 0 (Qa6)} g6 {-0.09/32 11 
(Nd6)} 36. Nf4 {-0.11/25 6} Kg7 {-0.12/31 0 (Ne7)} 37. Nd3 {0.00/27 11} Ne7 {
-0.09/33 0} 38. Ne5 {0.00/26 10} Nd7 {-0.19/34 0 (Nc6)} 39. Nxd7 {0.00/25 4}
Qxd7 {-0.09/33 0} 40. Qa6 {0.00/29 10 (Qb5)} Qc7 {-0.09/33 4 (Bd8)} 41. Bd3 {
0.00/26 5} g5 {-0.09/33 0 (Nc8) SolistaChess,Cfish 190119 64 bietet Remis} 42.
h3 {0.00/22 4} Ng8 {0.00/34 10} 43. Qb5 {0.00/28 3} Nf6 {0.00/32 0} 44. g4 {
0.00/30 1} h4 {0.00/33 3} 45. f4 {0.00/31 0} gxf4 {0.00/33 3} 46. exf4 {
0.00/32 0} Ba7 {0.00/34 3 (Bxd4)} 47. Be3 {0.00/32 4} Kf8 {0.00/36 0 (Bxd4)}
48. Kf3 {0.00/26 5 (Qa6)} Ne4 {0.00/32 3} 49. Bxe4 {0.00/26 0 (Qa6)} dxe4+ {
0.00/34 3} 50. Kxe4 {0.00/29 0} Qc2+ {0.00/36 3} 51. Kf3 {0.00/28 2} Qh2 {
0.00/34 1} 52. Qf1 {0.00/28 8 (Qxa5)} Qxb2 {0.00/32 5 (Qg3+)} 53. Qa6 {0.00/28
2} Qh2 {0.00/34 0} 54. Qxa7 {0.00/28 3} Qxh3+ {0.00/33 0} 55. Ke4 {0.00/28 6}
Qg2+ {0.00/34 0 (Qxg4)} 56. Kd3 {0.00/29 2} Qxg4 {0.00/35 4 (Qf1+)} 57. Qxa5 {
0.00/30 4 (Qc5+)} Qd1+ {0.00/31 2} 58. Bd2 {0.00/31 2} b3 {0.00/35 2 (Qf1+)}
59. Qd8+ {0.00/28 6 (Qa8+)} Kg7 {0.00/1 0} 60. Qg5+ {0.00/30 0} Kh8 {0.00/30 2
(Kh7)} 61. Qxh4+ {0.00/31 2 (Qc5)} Kg8 {0.00/37 3} 62. Qd8+ {0.00/34 0 (Qg3+)}
Kg7 {0.00/33 2} 63. Qg5+ {0.00/33 0 (f5)} Kh7 {0.00/38 2} 64. Qh4+ {0.00/34 0}
Kg8 {0.00/39 2} 65. Qg3+ {0.00/34 2} Kh7 {0.00/38 1} 66. f5 {0.00/30 0 (Qh2+)}
Qc2+ {0.00/36 2 (b2)} 67. Ke3 {0.00/31 2} exf5 {0.00/39 0 (b2)} 68. Qh4+ {
0.00/29 4 (Qh2+)} Kg7 {0.00/38 2 (Kg8)} 69. Qg5+ {0.00/33 7} Kh8 {0.00/44 0 
(Kh7)} 70. Qf6+ {0.00/32 1 (a5)} Kg8 {0.00/40 2} 71. Qg5+ {0.00/36 0 (Qh6)} Kh7
{0.00/38 2} 72. Qf6 {0.00/34 0 (a5)} Kg8 {0.00/43 5 (Qe4+)} 73. Qd8+ {0.00/36
6 (Qh6)} Kg7 {0.00/39 2 (Kh7)} 74. Qg5+ {0.00/34 1 (Qh4)} Kh8 {0.00/41 2 (Kh7)}
75. Qh6+ {0.00/28 1 (a5)} Kg8 {0.00/1 0} 76. Kf3 {0.00/29 1 (Qg5+)} Qe4+ {
0.00/36 2 (Qd1+)} 77. Kf2 {0.00/30 1} b2 {0.00/43 0} 78. Qg5+ {0.00/31 1} Kh7 {
0.00/43 1} 79. Qh6+ {0.00/27 1 (d5)} Kg8 {0.00/1 0} 80. Qg5+ {0.00/31 1} Kh8 {
0.00/39 2 (Kh7)} 81. Bf4 {0.00/32 2 (Qd8+)} Qxd4+ {0.00/33 2 (b1Q)} 82. Be3 {
0.00/29 1} Qxe3+ {0.00/37 0 (Qb4)} 83. Qxe3 {0.00/25 1} b1=Q {0.00/41 1} 84. a5
{0.00/28 0 (Qh6+)} (84. Qh6+ Kg8 85. Qg5+ Kf8 86. Qd8+ Kg7 87. Qg5+) 84... Qa2+
{-0.09/33 1 (Qb2+)} 85. Kg3 {0.00/37 1 (Kf3)} Qxa5 {-0.09/36 16} 86. Kf4 {
0.00/0 0 (Qh6+)} Qd5 {0} 87. Qh3+ {0.00/0 0} Kg7 {0} 88. Qxf5 {0.00/0 0} Qxf5+
{0} 89. Kxf5 {0.00/1 0} f6 {0} 90. Ke4 {0.00/0 0} Kg6 {0} 91. Kf4 {0.00/1 0} f5
{0} 92. Ke3 {0.00/0 0} Kg5 {0} 93. Kf3 {0.00/1 0} f4 {0} 94. Ke2 {0.00/0 0} Kg4
{0} 95. Kf2 {0.00/1 0} f3 {0} 96. Kf1 {0.00/1 0} Kf4 {0} 97. Kf2 {0.00/1 0} Ke4
{0} 98. Kf1 {0.00/1 0} Ke5 {0} 99. Ke1 {0.00/0 0} Kf5 {0} 100. Kf1 {0.00/0 0}
Ke4 {0} 101. Kf2 {0.00/1 0} Kf4 {0} 102. Kf1 {0.00/1 0} Ke3 {0} 103. Ke1 {
0.00/1 0} Kd3 {0} 104. Kf1 {0.00/0 0} Kd4 {0} 105. Kf2 {0.00/1 0} Ke4 {0} 106.
Kf1 {0.00/1 0} Kd3 {0} 107. Kf2 {0.00/1 0} Ke4 {0 (Lag: Av=0.41s, max=1.7s)}
1/2-1/2
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Cfish in practice and question

Post by Guenther »

Eduard wrote: Fri Feb 01, 2019 11:18 am Today some games with Cfish played on playchess. Reason: Cfish is little bit faster than Stockfish on my slow hardware.

I always play with contempt = 0 because the opponents have much faster hardware.
Well, if you think your opponents are better or have better hardware you should use negative contempt.
(values for contempt range from -100 to 100 at least for SF10 - I guess CFish is no different here)
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Cfish in practice and question

Post by zullil »

Cfish should never lose on time. Adjust the Move Overhead parameter:

Move Overhead
Assume a time delay of x ms due to network and GUI overheads. This is useful to avoid losses on time in those cases.

Also, as Guenther notes, Contempt ranges from -100 to 100, with default 24.
Eduard
Posts: 1439
Joined: Sat Oct 27, 2018 12:58 am
Location: Germany
Full name: N.N.

Re: Cfish in practice and question

Post by Eduard »

Thank You!

Unfortunately, Stockfish is playing weaker with a negative contempt (in my eyes). I tested that.
I will put Move overhead higher now. But then the opponent has a further advantage.
I would prefer that the engine at contempt 0 seeks the fastest way to draw.

Here is a another example. Yesterday I losed this game with white on time, after 176 moves.
What can I do? Black saw himself in advantage...

SolistaChess,Cfish 190119 - Kaloshmat,R 0-1, Wertungspartie, 5 min 2019
[d]8/R7/3b2b1/4kp1p/6p1/4PPP1/5KP1/8 w - - 0 1

Analysis by Cfish 190119 64:
177.Ra5+ Ke6 178.Ra8 Bf7 179.Ra6 Be8 180.Rb6 Kd5 181.Ra6 Bc6 182.Ra7 Bc5 183.Rh7 Be8 184.Rh6 Ke5 185.Ra6 Bf7 186.Ra5 Kd5 187.Ra8 Be7 188.Ra7 Kd6 189.Ra6+ Ke5 190.Ra5+ Bd5 191.Ke2 Bd8 192.Ra7 Bc4+ 193.Kf2 Kf6 194.Ra4 Be6 195.Ra7 Be7 196.Ra5 Bb4 197.Ra6 Kf7 198.Ra7+ Kg6 199.Ra6 Kf6 200.Rb6 Bd2 201.Ra6 Ke7 202.Ra7+ Bd7 203.Ra6
=/+ (-0.49) Tiefe: 49/52 00:00:40 141MN, tb=494478

...and Time