BoCC -- Beauty of Computer Chess

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

Moderator: Ras

User avatar
Rebel
Posts: 7339
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: BoCC -- Beauty of Computer Chess

Post by Rebel »

pohl4711 wrote: Sat Aug 09, 2025 6:14 am But if you really need these divided points, I will add this to the EAS-Tool, but this needs a 3rd rankinglist in the output...
Ah, no, too much work.

I made a super fast shortie evaluator, it extracts shorties from megabase with 2.3M positions within 8 seconds, output 490.340 games with evaluation. First 2 games :

Code: Select all

[Event "London m8"]
[Site "London"]
[Date "1851.??.??"]
[White "Kieseritzky, Lionel"]
[Black "Anderssen, Adolf"]
[Result "1-0"]
[PlyCount "71"]
[Short "70"]

1. d4 d5 2. c4 dxc4 3. e3 e5 4. Bxc4 exd4 5. exd4 Bd6 6. Nf3 Nf6 7. Nc3 O-O 8.
O-O h6 9. Ne5 Nc6 10. f4 Ne7 11. Qb3 Bxe5 12. dxe5 Qd4+ 13. Kh1 Ng4 14. Nd1 b5
15. Be2 Be6 16. Qg3 h5 17. h3 Nh6 18. Bxh5 f6 19. Bf3 Rad8 20. Qf2 fxe5 21. Be3
Qd3 22. fxe5 Nhf5 23. Kh2 Ng6 24. Bg5 Rd7 25. Rc1 Nxe5 26. Rc3 Qd6 27. Bf4 g5
28. Rc6 Ng4+ 29. hxg4 Rh7+ 30. Kg1 Qxf4 31. g3 Nxg3 32. Rxe6 Nxf1 33. Kxf1 Rh1+
34. Bxh1 Qc4+ 35. Re2 Qxg4 36. Bd5+ 1-0
Note the Short tag, the 70 points evaluation is based on the length of the game.

Code: Select all

[Event "London m9"]
[Site "London"]
[Date "1851.??.??"]
[White "Anderssen, Adolf"]
[Black "Loewenthal, Johann Jacob"]
[Result "0-1"]
[PlyCount "34"]
[Short "1200"]

1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 Bc5 5. O-O d6 6. c3 d3 7. b4 Bb6 8. a4 a5
9. b5 Ne5 10. Nxe5 dxe5 11. Qh5 Qf6 12. Ba3 Ne7 13. Nd2 Be6 14. Bxd3 O-O-O 15.
Qe2 Ng6 16. g3 Bh3 17. c4 Nf4 0-1
Note the Short tag, the 1200 points evaluation is based on the length of the game.

How it works, draws are skipped, the move number is created from the PlyCount tag, when the move number is > 60 (currently hard coded) the game is skipped, no shortie. When <=60 it looks into a flexible table to get the evaluation score and stored in the Short tag.

The flexible table is stored in the file values.txt , in there are the evaluations based on move number.

Code: Select all

8000 7500 7000 6500 6000 5500 5000 4500 4000 3600
3200 2800 3500 2200 1900 1700 1500 1350 1200 1100
1000  900  800  700  600  500  450  400  350  300
 250  210  180  150  120   95   70   50   35   25
  10    5    0    0    0    0    0    0    0    0
   0    0    0    0    0    0    0    0    0    0
   0    0    0    0    0    0    0    0    0    0
Freely change the values, but keep the format. This is how it is done in BoCC, it stops giving a bonus after move 40, a zero value means no shortie.

Another speed advantage is that you only have to do it once and the output file shorts-out.pgn is about 5 times shorter than the input file.

Operation :
. shorts.exe anand.pgn
. shorts.exe shortwins.pgn

90% of coding is debugging, the other 10% is writing bugs.
jefk
Posts: 970
Joined: Sun Jul 25, 2010 10:07 pm
Location: the Netherlands
Full name: Jef Kaan

Re: BoCC -- Beauty of Computer Chess

Post by jefk »

Looks like a very aggressive game to me.
Yep, (opening) books matter, and should have higher quality at higher Elo's
this game was the Vukovic gambit (for Black, sacrificing the knight on c5)
which is not good for White. Almost a trap. Better is simply 5.Bd3.
User avatar
pohl4711
Posts: 2759
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: BoCC -- Beauty of Computer Chess

Post by pohl4711 »

Rebel wrote: Sat Aug 09, 2025 9:49 pm
pohl4711 wrote: Sat Aug 09, 2025 6:14 am But if you really need these divided points, I will add this to the EAS-Tool, but this needs a 3rd rankinglist in the output...
Ah, no, too much work.
No, I can do that, if you really need that. Personally, I find percents way better to read than absolute numbers, and building a third ratinglist while computing, will lead to a slight slowdown of the EAS-Tool.
Rebel wrote: Sat Aug 09, 2025 9:49 pm I made a super fast shortie evaluator, it extracts shorties from megabase with 2.3M positions within 8 seconds, output 490.340 games with evaluation.
This is the real good news. If I understand that right, your BoCC-Tool does not need evals/comments in the source.pgn anymore and can now run on pgn-bases containing only moves, no evals. That is a huuuuuuuuuuuuuuuuuuuuuuuge progress. I always mentioned, this was a real weak point of your tool, and now it is gone. Great!
Rebel wrote: Sat Aug 09, 2025 9:49 pm How it works, draws are skipped, the move number is created from the PlyCount tag, when the move number is > 60 (currently hard coded) the game is skipped, no shortie.
The problem with shorties is, to set the (move-)limit. In the early days of the EAS-Tool, short-wins started from move 60, increasing the short-wins-point down to 40 moves. But this leads to problems, because the length of enginegames depends on
1) pgn-opening or just a FEN-code (an opening-endposition can end at move 8 or move 0 (if no movenumber is sprecified in the FEN-code))
2) Playing with draw- and resign-adjudications or not
3) using Tablebase to adjust games or not

This is the reason, I decided, a better way to calculate short-wins points, is to set the movelimits for these points by calculating the movelimits out of the overall length of all won games of source.pgn

Both methods do not deliver really "stable" movelimits, meaning, comparable movelimits over several different source.pgn-files. But the hardcoded movelimit is definitly worse in my experience: Switching from pgn-openings to FEN-openings alone leads to completely different short-wins-points, when using a hardcoded movelimit of 60 (or any other hardcoded number), because suddenly all games are 8 moves shorter... Using Syzygy-bases for adjudication shorts the games at least 5-10 moves in average. Even using 5-Syzygy or 6-Syzygy means 2-3 moves length-difference.
"Adjucation by eval"- enginegames are (at least) 10-15 moves shorter than enginegames played until mate.
Because of all this, a short-wins scoring-system will never be able to give exactly the same points when computing different source.pgn, because of these points 1-3 above and a hardcoded movelimit is a worse solution than calculating the movelimit depending on the source.pgn - even though both (hardcoding and calculating the movelimit) will not deliver stable points, when computing different source.pgn.
User avatar
Rebel
Posts: 7339
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: BoCC -- Beauty of Computer Chess

Post by Rebel »

pohl4711 wrote: Sun Aug 10, 2025 7:48 am
Rebel wrote: Sat Aug 09, 2025 9:49 pm
pohl4711 wrote: Sat Aug 09, 2025 6:14 am But if you really need these divided points, I will add this to the EAS-Tool, but this needs a 3rd rankinglist in the output...
Ah, no, too much work.
No, I can do that, if you really need that. Personally, I find percents way better to read than absolute numbers, and building a third ratinglist while computing, will lead to a slight slowdown of the EAS-Tool.
Okay, would be interesting to see the balance of points between sacs, sorts and bad draws.

pohl4711 wrote: Sun Aug 10, 2025 7:48 am
Rebel wrote: Sat Aug 09, 2025 9:49 pm I made a super fast shortie evaluator, it extracts shorties from megabase with 2.3M positions within 8 seconds, output 490.340 games with evaluation.
This is the real good news. If I understand that right, your BoCC-Tool does not need evals/comments in the source.pgn anymore and can now run on pgn-bases containing only moves, no evals. That is a huuuuuuuuuuuuuuuuuuuuuuuge progress. I always mentioned, this was a real weak point of your tool, and now it is gone. Great!
Ha ha, but no.

1. I made the tool for you.

2. It's no weak point at all, instead the opposite, quality of the output pgns is much better, it adds the BoCC points and the move number the game is decided to PGN tags.

3. The very first I do with your (great) tool is to skip the remove comments from pgn-extract and so all output files are with comments. I don't care that your tool runs somewhat longer.

pgn-extract --quiet --fixresulttags -C -N -V --plycount ../%gamebase% --output newsource.pgn > NUL

becomes :

pgn-extract --quiet --fixresulttags --plycount ../%gamebase% --output newsource.pgn > NUL

pohl4711 wrote: Sun Aug 10, 2025 7:48 am
Rebel wrote: Sat Aug 09, 2025 9:49 pm How it works, draws are skipped, the move number is created from the PlyCount tag, when the move number is > 60 (currently hard coded) the game is skipped, no shortie.
The problem with shorties is, to set the (move-)limit. In the early days of the EAS-Tool, short-wins started from move 60, increasing the short-wins-point down to 40 moves. But this leads to problems, because the length of enginegames depends on
1) pgn-opening or just a FEN-code (an opening-endposition can end at move 8 or move 0 (if no movenumber is sprecified in the FEN-code))
2) Playing with draw- and resign-adjudications or not
3) using Tablebase to adjust games or not

This is the reason, I decided, a better way to calculate short-wins points, is to set the movelimits for these points by calculating the movelimits out of the overall length of all won games of source.pgn

Both methods do not deliver really "stable" movelimits, meaning, comparable movelimits over several different source.pgn-files. But the hardcoded movelimit is definitly worse in my experience: Switching from pgn-openings to FEN-openings alone leads to completely different short-wins-points, when using a hardcoded movelimit of 60 (or any other hardcoded number), because suddenly all games are 8 moves shorter... Using Syzygy-bases for adjudication shorts the games at least 5-10 moves in average. Even using 5-Syzygy or 6-Syzygy means 2-3 moves length-difference.
"Adjucation by eval"- enginegames are (at least) 10-15 moves shorter than enginegames played until mate.
Because of all this, a short-wins scoring-system will never be able to give exactly the same points when computing different source.pgn, because of these points 1-3 above and a hardcoded movelimit is a worse solution than calculating the movelimit depending on the source.pgn - even though both (hardcoding and calculating the movelimit) will not deliver stable points, when computing different source.pgn.
Have you tried my tool?

EAS points based on move number via a flexible progressive table which you can tune to your desires.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
pohl4711
Posts: 2759
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: BoCC -- Beauty of Computer Chess

Post by pohl4711 »

I will definitly look into the new version of your BoCC tool. Will see, if I can use something in the EAS-Tool.
But please keep in mind, I am strictly convinced, using evaluations is not a good thing in a tool like this. But a very quick material-based eval at the end of each game - could be possible.

Right now, I am quite busy, so it will perhaps take a little time. But I plan to do new EAS-tool version with a third ratinglist with the EAS-points, not percents (IMHO, this is a good idea, because it can be helpful for engine devleopers. Perhaps). But not right now in the summer.