I took a brief look, and did some brief testing. I'll do more tests at the weekend and report back. Thank you very much. So initially I selected the first 3 games from your D96.pgn and created a bin with polyglot and then exported that bin with latest jja, git version v0.5.0-58-g023065b:chesskobra wrote: ↑Wed Jun 14, 2023 12:41 pm Could you take a look at this test case I created: https://gitlab.com/beejaganita/jja-tests/
Code: Select all
⇒ pex -s --selectonly 1:3 D96.pgn > D96-sample.pgn
⇒ polyglot make-book -min-game 1 -pgn D96-sample.pgn -bin D96-sample.bin
PolyGlot 2.0.4 by Fabien Letouzey.
inserting games ...
4 games.
346 entries.
filtering entries ...
250 entries.
sorting entries ...
saving entries ...
all done!
⇒ jja edit D96-sample.bin -o D96-sample-jja.pgn
Creating output PGN file...
Success creating output PGN file.
Generating a tree of all variations in the book...
Success generating a tree of all variations in the book.
Saving the opening tree into the given PGN file...
Saving done.
[pgn]
[Event "TCh-RUS Premier 2023"]
[Site "Sochi RUS"]
[Date "2023.05.10"]
[Round "9.2"]
[White "Lazavik, Denis"]
[Black "Paravyan, D"]
[Result "1/2-1/2"]
[WhiteTitle "GM"]
[BlackTitle "GM"]
[WhiteElo "2544"]
[BlackElo "2601"]
[ECO "D96"]
[Opening "Gruenfeld"]
[Variation "Russian variation"]
[PlyCount "155"]
[HashCode "ffbeedcb"]
[TotalPlyCount "155"]
[WhiteFideId "13515110"]
[BlackFideId "4194985"]
1. d4 Nf6 2. c4 g6 3. Nc3 d5 4. Nf3 Bg7 5. Qb3 dxc4 6. Qxc4 a6 7. Bf4 c6 8. e4 b5 9. Qb3 O-O 10. Be2 Qa5 11. Bd2 b4 12. Na4 Nxe4 13. Bxb4 Qc7 14. O-O a5 15. Ba3 Be6 16. Bc4 Bxc4 17. Qxc4 Nd6 18. Bxd6 Qxd6 19. Rac1 e6 20. Qe2 Nd7 21. Rc4 e5 22. Rd1 exd4 23. Nxd4 Rae8 24. Qf1 Ne5 25. Nxc6 Qxd1 26. Qxd1 Nxc4 27. g3 Nxb2 28. Nxb2 Bxb2 29. Qd2 Re6 30. Nxa5 Bf6 31. Nb3 Rd8 32. Qc2 Ra8 33. h4 h5 34. Kg2 Rea6 35. Nc1 Bg7 36. Qd2 Kh7 37. Qd5 R8a7 38. Qf3 Ra3 39. Qe4 Bh6 40. Nd3 Rxa2 41. Ne5 Bg7 42. Nf3 Bf6 43. Qe3 Kg7 44. Ng5 Bxg5 45. hxg5 Ra8 46. Kh3 Kg8 47. f4 R2a5 48. Qb6 Rd5 49. Qc6 Rad8 50. Qb6 R8d7 51. Qb8+ Kg7 52. Qb2+ Kh7 53. Qb8 Kg7 54. Qb2+ Rd4 55. Qc3 Kh7 56. Qc5 Kg8 57. Qc8+ Rd8 58. Qc6 R4d5 59. Qb6 R5d6 60. Qc7 Rd1 61. Qc6 Rf1 62. Kg2 Re1 63. f5 gxf5 64. g6 Rd2+ 65. Kh3 Rde2 66. gxf7+ Kxf7 67. Kh4 Re6 68. Qf3 Kg7 69. Qxf5 R1e5 70. Qd3 Re4+ 71. Kh3 h4 72. Qc3+ Kg6 73. Qd3 hxg3 74. Kxg3 Kg5 75. Qd2+ Re3+ 76. Kf2 Kg6 77. Qxe3 Rxe3 78. Kxe3 1/2-1/2
[/pgn]
Now jja creates 3 lines for this game alone which look like this:
1. Line 1
[pgn]
[Event "D96-1.bin"]
[Site "rosarote"]
[Date "2023.07.14"]
[Round "1"]
[White "?"]
[Black "?"]
[Result "*"]
[Annotator "jja v0.5.0"]
1. d4 Nf6 2. c4 g6 3. Nc3 d5 4. Nf3 Bg7 5. Qb3 dxc4 6. Qxc4 a6 7. Bf4 c6 8. e4 b5 9. Qb3 O-O 10. Be2 Qa5 11. Bd2 b4 12. Na4 Nxe4 13. Bxb4 Qc7 14. O-O a5 15. Ba3 Be6 16. Bc4 Bxc4 17. Qxc4 Nd6 18. Bxd6 Qxd6 19. Rac1 e6 20. Qe2 Nd7 21. Rc4 e5 22. Rd1 exd4 23. Nxd4 Rae8 24. Qf1 Ne5 25. Nxc6 Qxd1 26. Qxd1 Nxc4 27. g3 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qc3 Kh7 54. Qc5 Kg8 55. Qc8 Rd8 56. Qc6 *
[/pgn]
3. Line 3
[pgn]
[Event "D96-1.bin"]
[Site "rosarote"]
[Date "2023.07.14"]
[Round "3"]
[White "?"]
[Black "?"]
[Result "*"]
[Annotator "jja v0.5.0"]
1. d4 Nf6 2. c4 g6 3. Nc3 d5 4. Nf3 Bg7 5. Qb3 dxc4 6. Qxc4 a6 7. Bf4 c6 8. e4 b5 9. Qb3 O-O 10. Be2 Qa5 11. Bd2 b4 12. Na4 Nxe4 13. Bxb4 Qc7 14. O-O a5 15. Ba3 Be6 16. Bc4 Bxc4 17. Qxc4 Nd6 18. Bxd6 Qxd6 19. Rac1 e6 20. Qe2 Nd7 21. Rc4 e5 22. Rd1 exd4 23. Nxd4 Rae8 24. Qf1 Ne5 25. Nxc6 Qxd1 26. Qxd1 Nxc4 27. g3 Nxb2 28. Nxb2 Bxb2 29. Qd2 Re6 30. Nxa5 Bf6 31. Nb3 Rd8 32. Qc2 Ra8 33. h4 h5 34. Kg2 Rea6 35. Nc1 Bg7 36. Qd2 Kh7 37. Qd5 R8a7 38. Qf3 Ra3 39. Qe4 Bh6 40. Nd3 Rxa2 41. Ne5 Bg7 42. Nf3 Bf6 43. Qe3 Kg7 44. Ng5 Bxg5 45. hxg5 Ra8 46. Kh3 Kg8 47. f4 R2a5 48. Qb6 Rd5 49. Qc6 Rad8 50. Qb6 R5d6 51. Qc7 Rd1 52. Qc6 Rf1 53. Kg2 Re1 54. f5 gxf5 55. g6 Rd2 56. Kh3 Rde2 57. gxf7 Kxf7 58. Kh4 Re6 59. Qf3 Kg7 60. Qxf5 R1e5 61. Qd3 Re4 62. Kh3 h4 63. Qc3 Kg6 64. Qd3 hxg3 65. Kxg3 Kg5 66. Qd2 Re3 67. Kf2 Kg6 68. Qxe3 Rxe3 69. Kxe3 *
[/pgn]
What you can quickly notice is the extraneous lines are caused by the repetitions that takes place on moves 53 and 56. It's an open question whether we want to include these repetitions as new lines in the PGN, or we skip them, or maybe we make it optional through a command-line parameter. My initial opinion is it makes sense to keep them because it provides a clearer, and broader look at the opening book, however as usual I am open to discussion, suggestions, and thoughts.