Page 2 of 8

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Sat Sep 12, 2020 10:29 pm
by OliverBr
Dann Corbit wrote: Sat Sep 12, 2020 5:47 am [As long as the updated code is on github, a release is not necessary
Ok, this is great. So I can share my ideas with github.

The idea is to shorten the SEE-loop in two ways:
1) The last capture is the king, but the square is still attacked, so the loop ends here.
2) The value of captured piece is low than the lead (e.G. wP x bQ, bP x wP, even if wP will be captured it won't be enough for white.)

Here is the commit:
https://github.com/olithink/OliThink/co ... 1313784a55

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Sat Sep 12, 2020 10:35 pm
by towforce
OliverBr wrote: Sat Sep 12, 2020 10:08 pm
towforce wrote: Sat Sep 12, 2020 1:04 am Could the Java version be hosted in a web page? That would make it super-easy to use - just follow a link!
It was hosted on my homepage for many years..
It's a sad story, because security fanatics decided that Java applets were not secure enough and so they vanished... I took OliThink-Applet off my homepage it was nearly impossible to get a browser to run it. I could do it only with Firefox and a lot of configuration.

Perhaps there is a way working with certificates, I just didn't invest anymore because I didn't know if people still wanted it.

PS: The boss of my current job as programmer played the engine when checking the internet for information about me :)

Yes - now you mention it, all the new active web pages (or applications built into a web page) I've seen recently have been using JavaScript rather than Java, and running Java seems to have been permanently disabled in a lot of browsers. Apologies for being behind on that happening.

I used to use Java every day in a previous job (writing code that could run in a printer). The last time I used it was about 4 years ago. We had a requirement to import data from a particular old database, and the only free code I could find that would convert this data format to something we could work with was a JAR I downloaded. It ran on a PC, which obviously needed the Java runtime library installed.

The nearest thing we seem to have right now to a language that can run anywhere is JavaScript: it seems to be usable in more places than most other languages. The increase in cross-platform frameworks is is encouraging as well. JavaScript is not ideal for large projects, or code that needs to run quickly, like a chess program.

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Sun Sep 13, 2020 1:39 am
by jdart
running Java seems to have been permanently disabled in a lot of browsers
Chrome has disabled the API that Java used to run inside the browser. Other browsers have implemented some restrictions. This is largely for security reasons. Java, along with similar technologies like Flash which deliver code to run client-side in the browser, has been the source of hundreds of security bugs over the years.

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Sun Sep 13, 2020 6:08 pm
by OliverBr
OliverBr wrote: Sat Sep 12, 2020 10:29 pm The idea is to shorten the SEE-loop in two ways:
1) The last capture is the king, but the square is still attacked, so the loop ends here.
2) The value of captured piece is low than the lead (e.G. wP x bQ, bP x wP, even if wP will be captured it won't be enough for white.)
Actually, 1) lead me to a bug in SEE. fixed it and of course I cannot keep quiet with a clear bug, so I released OliThink 5.7.7.

Line 884 in 5.7.6 was:

Code: Select all

u64 attacks = attacked(t, 0) | attacked(t, 1);
Normally the method "attacked" collects all king attackers for check, but this time it's not the correct method. Why? Because the kings are not included as they never can attack the other king.
So now the fix is to collect all non sliding attackers and not forget the king:

Code: Select all

u64 attacks = ((PCAP(t, 0) | PCAP(t, 1)) & pieceb[PAWN])
		| (nmoves[t] & pieceb[KNIGHT]) | (kmoves[t] & pieceb[KING]);
the sliding attackers are added in each loop (like it was before):

Code: Select all

attacks |= (BOCC(t) & BQU) | (ROCC(t) & RQU);

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Sun Sep 13, 2020 10:51 pm
by OliverBr
Bugfix gained about 20 ELO points:

Code: Select all

   # PLAYER            :  RATING  ERROR  POINTS  PLAYED   (%)     W     D    L  D(%)  CFS(%)
   1 OliThink 5.7.7    :      20     11  1591.0    3015  52.8  1017  1148  850  38.1     100
   2 OliThink 5.7.5    :       0   ----  1470.5    3016  48.8   880  1181  955  39.2      60
   3 OliThink 5.7.6    :      -1     11  1461.5    3015  48.5   885  1153  977  38.2     ---

White advantage = 72.78 +/- 4.26
Draw rate (equal opponents) = 39.96 % +/- 0.77
This verifies the ambiguous story about 5.7.6, that it's a change in style. At best.

Since 5.3.3 I made a pact with the devil and started aggressive pruning that did improve general strength, but is bad at tactical positions with quiet moves in the main line.

Those two positions are best evidence:

[d]6k1/5p1p/P1pb1nq1/6p1/3P4/1BP2PP1/1P1Nb2P/R1B3K1 b - - 9 9 bm g6d3

[d]8/5k1p/1p1pRp2/3P4/PpP3Pp/6bP/6K1/8 w - - 0 2 bm c4c5

Older OliThink found those best moves in depth 15/16, but now needs more than 20 plies. While general strength is gaining, it's less tactical "surprising".
What do you think is the better way?

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Mon Sep 14, 2020 6:11 pm
by Dann Corbit
Concerning:

Code: Select all

Older OliThink found those best moves in depth 15/16, but now needs more than 20 plies. While general strength is gaining, it's less tactical "surprising".
What do you think is the better way?
If one engine is pruning a lot more, then I do not think depth is the right measure.
If the pruning engine still finds the answer in the same time, then there is no degradation even in tactical ability.
It's hard to know from a few tactical positions also. Just changing move ordering a hair can throw that kind of thing off.
I would suggest at least 1200 positions at one second each, so 20 minutes for one pass.

Something I have found useful for some rare positions is to use and s curve to prune very little when mobility is close to zero and prune more when it goes over 100 move choices.
I mention this because I know Olithink has mobility data handy.

You might also examine what ShashChess and BlueFish are doing, because their tacitics are very good and yet they prune like mad.

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Tue Sep 15, 2020 12:25 am
by OliverBr
Dann Corbit wrote: Mon Sep 14, 2020 6:11 pm If one engine is pruning a lot more, then I do not think depth is the right measure.
If the pruning engine still finds the answer in the same time, then there is no degradation even in tactical ability.
Of course, it's not only depth, but time. Fact is: More pruning = Later (or even never) such super tactical positions are being found.
This is why they say position 1 (bm Qd3) is invisible for engines.

So now I have implemented a reverse futility pruning into 5.7.7a and the result is surprising:

Code: Select all

   # PLAYER             :  RATING  ERROR  POINTS  PLAYED   (%)     W     D     L  D(%)  CFS(%)
   1 OliThink 5.7.7a    :      24      9  1845.0    3455  53.4  1059  1572   824  45.5     100
   2 OliThink 5.7.7     :       0   ----  1610.0    3455  46.6   824  1572  1059  45.5     ---

White advantage = -1.11 +/- 4.42
Draw rate (equal opponents) = 45.69 % +/- 0.85
This looks good, doesn't it? But 5.7.7a doesn't find position 2 (bm c5) at depth=32 and 138 seconds.

I am not saying that this means it's playing worse chess. While tactically losing impact, it's dominating the game positionally from beginning. The game looks great and it doesn't need tactical (lucky?) strikes.

PS: Gaining ELO against former self doesn't mean it's the same as ELO gain against other engines. It's complicated.

PPS: 5.7.7a doesn't find c5 for position 2 at depth=34 and 1190 seconds..

Code: Select all

34   134 118978 6296456724  e6e3 g3e5 e3b3 e5c3 g2f3 f7g6 f3f4 c3e5 f4e4 e5c3 b3b1 g6g5 e4d3 h7h5 g4h5 g5h5 b1f1 h5h6 d3c2 h6g5 f1g1 g5h5 g1g8 c3d4 c2b3 d4c5 g8f8 h5g5 f8f7 f6f5 f7g7 g5f4 g7g8 

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Tue Sep 15, 2020 3:53 pm
by OliverBr
5.7.7a may not find bm c5 in position 2, but it knows how to play Fruit 2.1:

Code: Select all

   # PLAYER             :  RATING  ERROR  POINTS  PLAYED   (%)     W     D     L  D(%)  CFS(%)
   1 OliThink 5.7.7a    :      22      7  3319.5    6252  53.1  2667  1305  2280  20.9     100
   2 Fruit 2.1          :       0   ----  2932.5    6252  46.9  2280  1305  2667  20.9     ---

White advantage = 12.89 +/- 4.01
Draw rate (equal opponents) = 20.94 % +/- 0.54
Still there are two other, minor improvements (b, c). The next version will probably be released soon. ELO gain is guessed to be about 30.

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Tue Sep 15, 2020 5:32 pm
by OliverBr
OliThink 5.7.8 has been released.

Its main new feature is "reverse futility pruning".

I tried "standard futility pruning" and "razoring" several times before and they never worked well. This "reverse" version, though, is a breakthrough in strength.

It's only a few lines of code, so there is no big change, 1606* lines now.

Code: Select all

if (!ch && !pvnode && d <= 8) {
	w = evallazy(c, mat);
	if (w > beta + 85*d) return w;
}
Here is a little tourney that shows the improvement against different engines:

Code: Select all

   # PLAYER                   :  RATING  ERROR  POINTS  PLAYED   (%)    W    D    L  D(%)  CFS(%)
   1 Scorpio_2.8.8 MCTS+NN    :       8     27   256.0     500  51.2  221   70  209  14.0      73
   2 OliThink 5.7.8           :       0   ----  1178.0    2000  58.9  996  364  640  18.2     100
   3 Fruit 2.1                :     -37     28   223.5     500  44.7  171  105  224  21.0      84
   4 K2 v.087                 :     -57     29   209.5     500  41.9  156  107  237  21.4     100
   5 Arasan 11.7              :    -178     31   133.0     500  26.6   92   82  326  16.4     ---

White advantage = -5.62 +/- 7.44
Draw rate (equal opponents) = 18.99 % +/- 0.90
Still, with more pruning and increasing general strength, the tactical impact on particular positions gets completely lost. Two example positions are in this thread.

Here is an interesting game between OliThink 5.7.8 and Archux 1.1 (a nice derivative of Strelka). Amazing game!

[pgn][Event "Computer Chess Game"]
[Site "Olivers-MacBook-2.local"]
[Date "2020.09.15"]
[Round "-"]
[White "OliThink 5.7.8"]
[Black "Archux 1.1"]
[Result "1-0"]
[TimeControl "40/60"]
[Annotator "4. -0.08 1... -0.24"]

1. e4 e5 {-0.24/14 2.3} 2. Nf3 Nc6 {-0.09/14 1.2} 3. Bb5 Bc5 {-0.13/13 1.0}
4. d3 {-0.08/16 1.9} Nf6 {-0.08/13 1.4} 5. Nc3 {-0.02/16 1.5} O-O
{+0.05/13 1.1} 6. Na4 {+0.00/16 1.0} Bd6 {+0.09/13 1.4} 7. Nc3
{+0.00/19 0.6} a6 {+0.21/14 1.2} 8. Ba4 {+0.10/15 1.0} b5 {+0.21/14 1.0} 9.
Bb3 {+0.17/17 1.4} Na5 {+0.24/14 0.9} 10. O-O {+0.34/16 1.1} Bb7
{+0.24/14 1.0} 11. Be3 {+0.33/18 0.4} Qe7 {+0.28/13 0.8} 12. Nh4
{+0.53/17 1.0} g6 {+0.35/14 2.3} 13. Bg5 {+0.43/17 0.1} Nxb3 {+0.31/13 0.5}
14. axb3 {+0.37/16 0.6} Qe6 {+0.30/13 0.8} 15. Nf3 {+0.31/17 2.4} Bc5
{+0.33/12 0.6} 16. Kh1 {+0.38/14 1.3} Rfe8 {+0.45/13 2.9} 17. Qe1
{+0.30/15 1.7} Bc6 {+0.50/12 2.6} 18. Nd1 {+0.31/15 1.4} d5 {+0.70/12 0.9}
19. Nd2 {-0.10/16 1.7} d4 {+1.17/13 1.4} 20. f4 {+0.01/17 1.3} exf4
{+1.04/13 1.5} 21. Bxf4 {+0.11/18 0.3} Nd5 {+1.09/11 0.3} 22. Bg3
{+0.05/18 1.3} Nb4 {+0.58/13 1.8} 23. Nf2 {+0.08/17 0.1} Rac8
{+0.82/12 2.7} 24. Qc1 {+0.50/14 1.4} Bb7 {+0.54/12 1.1} 25. Nf3
{+0.40/16 2.5} f6 {+0.51/12 1.6} 26. Qd2 {+0.34/15 0.4} Rf8 {+0.45/12 1.8}
27. c3 {+0.48/17 2.0} Nc6 {+0.39/14 1.6} 28. b4 {+0.45/17 0.5} Bb6
{+0.23/14 9} 29. Rac1 {+0.40/17} Rf7 {+0.28/13 1.1} 30. c4 {+0.64/14 3} g5
{+0.17/13 2.8} 31. Rfe1 {+0.69/15 2.0} h6 {+0.35/12 0.5} 32. Kg1
{+0.53/15 2.5} Kg7 {+0.38/12 1.2} 33. h3 {+0.47/16 3} Rd7 {+0.14/12 1.1}
34. b3 {+0.52/14 2.4} Rg8 {+0.31/10 0.7} 35. Rf1 {+0.47/14 4} Rf7
{+0.26/10 0.5} 36. Ra1 {+0.56/13 1.9} Re8 {+0.34/10 0.4} 37. Kh1
{+0.58/14 2.2} Rd8 {+0.38/10 0.6} 38. Rfe1 {+0.57/14 2.0} a5 {+0.56/11 0.9}
39. bxa5 {+0.68/17 1.6} Bc5 {+0.22/12 0.5} 40. cxb5 {+1.03/20 1.7} Bb4
{+0.29/13 0.6} 41. Qc2 {+1.15/19} Bxe1 {+0.12/15 1.8} 42. Rxe1
{+1.15/21 0.2} Nb4 {+0.41/15 1.5} 43. Qc4 {+1.15/21 0.3} Qxc4
{+0.44/15 2.6} 44. bxc4 {+1.15/21 0.1} h5 {+0.50/14 1.6} 45. a6
{+1.15/20 1.4} Ba8 {+0.18/14 1.3} 46. a7 {+1.15/18 2.2} c5 {+0.88/12 0.8}
47. Bb8 {+1.15/17 1.5} Kh8 {+0.78/12 1.5} 48. Ra1 {+1.15/16 1.5} Rg7
{+0.61/13 2.2} 49. Nh2 {+1.15/17 1.2} Kh7 {+0.78/13 1.6} 50. Kg1
{+1.15/18 0.1} Rdg8 {+0.65/12 1.4} 51. Ra4 {+1.15/18 1.5} Nc2
{+0.46/13 0.9} 52. g4 {+1.76/16 1.3} h4 {+0.00/14 1.0} 53. Ra6
{+2.11/17 1.1} Rf7 {+0.04/14 0.8} 54. Rc6 {+2.15/18 1.3} Rd8 {+0.00/14 1.3}
55. Rxc5 {+2.15/20 1.3} Ne1 {-0.19/14 1.1} 56. Kf1 {+2.15/19 1.9} Nc2
{-0.25/15 0.9} 57. Nf3 {+2.15/14 0.5} Bb7 {-0.32/14 0.9} 58. b6
{+2.88/14 1.5} Kg6 {-0.42/13 1.0} 59. Ke2 {+2.92/18 1.8} Re8 {-1.48/14 8}
60. Rc7 {+4.11/20 1.7} Rxc7 {-1.46/15 0.9} 61. bxc7 {+4.29/21 0.8} Rc8
{-3.02/15 3} 62. Kd2 {+5.07/25 2.8} Nb4 {-3.61/16 0.9} 63. Nxd4
{+5.43/24 1.8} Ba8 {-3.69/16 1.3} 64. Nb5 {+6.10/23 2.0} Na6 {-4.27/16 0.8}
65. d4 {+6.66/23 1.9} Rf8 {-4.73/17 3} 66. Nd6 {+7.97/22 1.7} Nxc7
{-5.04/19 0.7} 67. Bxc7 {+8.73/23 1.1} Kg7 {-6.30/19 8} 68. d5
{+9.29/24 1.5} Rg8 {-7.44/17 0.7} 69. c5 {+11.20/22 1.8} Kf8 {-8.44/17 1.2}
70. c6 {+12.77/26 1.5} Ke7 {-8.82/16 0.3} 71. Nf5+ {+14.66/26 2.6} Ke8
{-17.49/19 3} 72. Bb8 {+20.43/27 2.9} Rf8 {-18.92/17 1.6} 73. c7
{+21.75/24 1.5} Kf7 {-19.40/14 0.4} 74. Nd6+ {+21.97/22 1.1} Kg6
{-17.52/16 0.6} 75. c8=Q {+1000.13/24 5} Rxc8 {-19.22/17 0.3} 76. Nxc8
{+1000.11/25 3} Kf7 {-19.71/15 0.1} 77. Nb6 {+1000.10/22} Bb7
{-13.63/12 0.1} 78. Nd3 {+1000.10/20} f5 {-20.64/11} 79. exf5
{+1000.08/16 0.1} Kf8 {-23.07/10} 80. Nc5 {+1000.06/18} Ba8 {-22.38/6} 81.
Nxa8 {+1000.06/11} Kg7 {-1000.05/8} 82. Nb6 {+1000.05/11} Kg8 {-1000.04/6}
83. a8=Q {+1000.04/7} Kh7 {-1000.02/3} 84. Be5 {+1000.02/3} Kh6
{-1000.01/1} 85. Qh8# {+1000.01/1}
{Xboard adjudication: Checkmate} 1-0
[/pgn]

OliThink sacrifices a rook in move 41 and overruns black with an army of pawns.

PS: *Strelka 2.0 with 6114 lines of code may be the second smallest engine > 2500 ELO. Fruit 2.1 has 15320 lines).

Re: Official Release of OliThink 5.7.5 including a Java-GUI

Posted: Thu Sep 17, 2020 5:38 pm
by OliverBr
5.7.9 is a special edition because it has beaten idol Glaurung 1.2.1 in a very close battle.

Code: Select all

40/30:
   # PLAYER                :  RATING  ERROR  POINTS  PLAYED   (%)     W     D     L  D(%)  CFS(%)
   1 OliThink 5.7.9        :      13     13  2004.5    4000  50.1  1644   721  1635  18.0      56
   2 Glaurung 1.2.1 SMP    :      12     10  4061.5    8000  50.8  3332  1459  3209  18.2      99
   3 OliThink 5.7.8        :       0   ----  1934.0    4000  48.4  1565   738  1697  18.4     ---

White advantage = 39.31 +/- 3.45
Draw rate (equal opponents) = 18.38 % +/- 0.46