lantonov / asmFish

A continuation of the nice project asmFish by Mohammed Li. Latest version: 07.08.2019
https://lantonov.github.io/asmFish/
Other
118 stars 49 forks source link

asmFish still losing on time? #90

Closed pjdouillard closed 7 years ago

pjdouillard commented 7 years ago

I am using the Windows version 2017-10-04 downloaded from here. In this draw game (over Playchess), I had a 60+ second advance over my opponent who was White at some point. When we arrived in the end game with 6 or less pieces, I would like to know why asmFish is taking 20 sec to "think" when the ETB (6-men) tells it's a draw instead of playing instantly like it should.

What is happening and why the engine calculate for so long when there is nothing to calculate when you are using the ETB?

Here is the game:

[Event "Rated game, 5 min"] [Site "Engine Room"] [Date "2017.10.24"] [Round "?"] [White "xxxx, Toltec Proteus"] [Black "Me, asmFishW_2017-10-04"] [Result "1-0"] [ECO "D85"] [WhiteElo "2548"] [BlackElo "2421"] [Annotator "0.31;0.08"] [PlyCount "253"] [EventDate "2017.10.24"] [SourceTitle "playchess.com"] [TimeControl "300"]

{Toltec Proteus (32 threads): 40.9 plies; 55,007kN/s Genuine Intel(R) CPU @ 2. 30GHz 2294MHz, (20 cores, 40 threads), MyBook.ctg, 4096 MB} 1. d4 {B 0} Nf6 {B 0} 2. Nf3 {B 0} g6 {B 0} 3. c4 {B 0} Bg7 {B 0} 4. Nc3 {B 0} d5 {B 0} 5. cxd5 {0.31/26 8} Nxd5 {B 0} 6. e4 {0.43/22 1} Nxc3 {B 0} 7. bxc3 {0.16/27 8} c5 {B 0} 8. Be3 {0.25/25 0} Qa5 {B 0} 9. Qd2 {0.20/27 6} Nc6 {B 0} 10. Rb1 { 0.21/26 8} a6 {B 0} 11. Rc1 {0.10/28 8} cxd4 {B 0} 12. cxd4 {0.07/27 2} Qxd2+ { B 0} 13. Kxd2 {0.09/28 7} e6 {B 0} 14. Bd3 {0.17/23 1} O-O {B 0} 15. Rc5 { 0.07/27 11} Rd8 {B 0} 16. Rb1 {0.05/33 6} Nxd4 {B 0} 17. Bxd4 {0.18/32 5} Bxd4 {0.08/31 11} 18. Nxd4 {0.26/34 0} Rxd4 {0.08/29 1} 19. Ke3 {0.17/34 4} Rd8 {B 0 } 20. Rb6 {0.48/27 3} Bd7 {B 0} 21. Rxb7 {0.43/27 1} Bb5 {B 0} 22. Bc2 { 0.39/29 11} Rac8 {B 0} 23. Rbc7 {0.56/26 3} Rxc7 {B 0} 24. Rxc7 {0.51/30 15} Bf1 {B 0} 25. g3 {0.47/31 5} h6 {0.52/29 14} 26. f4 {0.40/27 7} Rd6 {0.48/31 1}

  1. h4 {0.65/28 5} h5 {0.40/33 3} 28. a4 {0.75/31 1} Kf8 {0.79/34 14} 29. Rc5 { 0.82/32 6} Ke7 {0.65/32 9} 30. f5 {0.82/34 0} gxf5 {0.08/30 6} 31. exf5 { 0.27/34 8} Bh3 {0.01/32 0} 32. Bd3 {0.11/33 9} Bxf5 {0.00/50 7} 33. Bxf5 { 0.00/45 0} exf5 {0.00/53 1} 34. Rxf5 {0.00/47 0} Rg6 {0.00/61 13} 35. Rxh5 { 0.00/60 0} Rxg3+ {0.00/66 1} 36. Kf4 {0.00/61 0} Rc3 {0.00/84 6} 37. Re5+ { 0.00/66 9} Kf6 {0.00/99 0} 38. Ra5 {0.00/65 3} Kg7 {0.00/91 6} 39. h5 {0.00/71 4} Kh6 {0.00/104 9} 40. Rxa6+ {0.00/76 3} Kxh5 {0.00/127 0} 41. a5 {0.00/73 0} Rc4+ {0.00/49 34} 42. Ke3 {0.00/71 8} Rc3+ {0.00/51 0} 43. Kd2 {0.00/80 3} Ra3 {0.00/31 25} 44. Rb6 {0.00/114 0} Rxa5 {0.00/40 8} 45. Rf6 {0} Ra7 {0.00/28 4}
  2. Rf1 {0} Kg4 {0.00/42 13} 47. Rg1+ {0} Kf3 {0.00/51 3} 48. Rf1+ {0} Ke4 { 0.00/51 1} 49. Rf6 {0} Kd5 {0.00/52 4} 50. Rf1 {0} Rd7 {0.00/42 20} 51. Ke2 {0} Ke5 {0.00/47 16} 52. Kf3 {0} f6 {0.00/49 3} 53. Re1+ {0} Kf5 {0.00/62 8} 54. Re8 {0} Rd3+ {0.00/57 2} 55. Ke2 {0} Rc3 {0.00/51 2} 56. Re7 {0} Kf4 {0.00/42 1 } 57. Rf7 {0} f5 {0.00/56 2} 58. Re7 {0} Rc2+ {0.00/50 10} 59. Kf1 {0.00/1 0} Kf3 {0.00/40 2} 60. Kg1 {0.00/1 0} Rg2+ {0.00/50 2} 61. Kf1 {0} f4 {0.00/55 2}
  3. Re8 {0} Rb2 {0.00/51 3} 63. Kg1 {0.00/1 0} Rb1+ {0.00/51 1 Cisco2015, asmFishW2017-10-04 offers a draw} 64. Kh2 {0.00/1 0} Ra1 {0.00/54 3} 65. Rd8 {0} Rb1 {0.00/56 5} 66. Rc8 {0} Rb6 {0.00/54 3} 67. Rc3+ {0} Kg4 {0.00/50 1}
  4. Rc2 {0} Rb1 {0.00/59 1} 69. Kg2 {0} Rb8 {0.00/42 1} 70. Ra2 {0} Rb1 { 0.00/58 1} 71. Rc2 {0} Rb4 {0.00/56 1} 72. Ra2 {0} Rb8 {0.00/53 0} 73. Kf1 {0} Kh3 {0.00/52 3} 74. Ra7 {0} Kg3 {0.00/54 0} 75. Rg7+ {0} Kf3 {0.00/54 0} 76. Kg1 {0.00/1 0} Rb1+ {0.00/54 1} 77. Kh2 {0.00/1 0} Rb2+ {0.00/58 0} 78. Kh1 {0} Ke3 {0.00/43 0} 79. Re7+ {0.00/1 0} Kf2 {0.00/44 0} 80. Ra7 {0} Ke3 {0.00/48 0}
  5. Re7+ {0} Kf3 {0.00/51 1} 82. Re5 {0} Re2 {0.00/46 0} 83. Rd5 {0} Re1+ { 0.00/47 1} 84. Kh2 {0.00/1 0} Ra1 {0.00/52 0} 85. Re5 {0} Rb1 {0.00/52 0} 86. Re6 {0} Rb2+ {0.00/47 0} 87. Kg1 {0} Rb1+ {0.00/50 0} 88. Kh2 {0.00/1 0} Rb7 { 0.00/51 0} 89. Rf6 {0} Rb2+ {0.00/41 0} 90. Kh3 {0} Rb8 {0.00/42 0} 91. Kh2 {0} Rh8+ {0.00/44 0} 92. Kg1 {0.00/1 0} Rg8+ {0.00/43 0} 93. Kf1 {0} Rb8 {0.00/36 0 } 94. Kg1 {0.00/1 0} Rb1+ {0.00/39 0} 95. Kh2 {0.00/1 0} Ra1 {0.00/34 0} 96. Re6 {0} Kf2 {0.00/36 0} 97. Rc6 {0} Kf3 {0.00/23 0} 98. Re6 {0} Ra8 {0.00/31 0}
  6. Kg1 {0} Rg8+ {0.00/29 0} 100. Kf1 {0.00/1 0} Rg2 {0.00/32 0} 101. Rc6 {0} Rb2 {0.00/29 0} 102. Rc3+ {0} Kg4 {0.00/53 0} 103. Rc6 {0} Rb1+ {0.00/29 0}
  7. Kf2 {0} Rb8 {0.00/42 0} 105. Rg6+ {0} Kh5 {0.00/42 0} 106. Rg7 {0} Kh4 { 0.00/33 0} 107. Kf3 {0} Rb3+ {0.00/37 0} 108. Kxf4 {0} Kh3 {0.00/28 0} 109. Rc7 {0} Rb4+ {0.00/34 0} 110. Kf3 {0} Rb3+ {0.00/3 0} 111. Ke4 {0} Rb1 {0.00/42 0}
  8. Rh7+ {0} Kg2 {0.00/47 0} 113. Rg7+ {0} Kf1 {0.00/3 0} 114. Kf3 {0} Rb5 { 0.00/4 0} 115. Rg8 {0} Ra5 {0.00/3 0} 116. Re8 {0} Ra3+ {0.00/3 0} 117. Ke4 {0} Ra4+ {0.00/34 0} 118. Ke3 {0} Ra1 {0.00/3 0} 119. Rf8+ {0} Ke1 {0.00/4 0} 120. Re8 {0} Kd1 {0.00/35 0} 121. Re5 {0} Rb1 {0.00/3 0 '} 122. Rd5+ {0} Kc1 { 0.00/4 0} 123. Re5 {0} Rb3+ {0.00/1 0} 124. Ke4 {0} Rb7 {0.00/3 0} 125. Ke3 {0} Rb1 {0.00/3 0} 126. Rd5 {0} Rb3+ {0.00/1 0 Time} 127. Kd4 {0} 1-0
lantonov commented 7 years ago

I couldn't reproduce this behaviour. In Winboard, starting from move 40 of the above game and with 5-man TB, asmFish used fully the TB, reaching depth 100 for parts of a second. There was a similar issue before in #58. What happens is that in the endgame the PV is very long and when the engine sends it to the GUI, it spams the GUI which cannot process this information fast. So we made a filter ("spamfilter") that filters the info sent to the GUI. In this case (fast computer that reaches big depth for a short time), make an asmFish with assembly-time option USE_SPAMFILTER = 1 as a default.

pjdouillard commented 7 years ago

By the time you replied to my inquiry, I had switched to 5-men TB (instead of the 6-men) and the issue seems gone as I have ran into 3 more similar games that went down properly. I will try to make the build with this filter. Thank you for your reply, I think this issue can be close as you know why it is happening.

P.S.: Are there new switch to compile for Ryzen, or popcnt is still the only one usable?

lantonov commented 7 years ago

Seems that 5-man spams less than 6-man which is logical -- 5-man reaches lesser depths. Only popcnt for Ryzen, the pext instruction is slow on Ryzen and they need to fix it.

pjdouillard commented 6 years ago

For this problem, I found out that - even after 2 years of utilization - my EGT in the Fritz GUI was not properly configured. When this was fixed, every games from that point that reach 6-men was took over the GUI and played instantly with no engine involved.