vitogit / pgn-tactics-generator

Generate chess puzzles / tactics from a pgn file
MIT License
111 stars 28 forks source link

tactics.pgn is empty #37

Closed jhfide closed 1 year ago

jhfide commented 1 year ago

Good morning,

I got following issue when running python3 main.py --quiet --depth=12 --strict=True --threads=2 --memory=1024

There was nothing been generated in the tactics.pgn file and there is no error message when running.

pgn-tactics-generator %python3 main.py --quiet --depth=12 --strict=True --threads=2 --memory=1024 Looking up stockfish-osx-x86_64 ... Local stockfish-osx-x86_64 is newer than release pgn-tactics-generator %

The pgn file I used is this one:

[Event "Rated Rapid game"] [Site "https://lichess.org/u2QGEPmx"] [Date "2022.04.25"] [White "Ruslan0209"] [Black "qH11"] [Result "0-1"] [UTCDate "2022.04.25"] [UTCTime "11:51:07"] [WhiteElo "2012"] [BlackElo "1988"] [WhiteRatingDiff "-6"] [BlackRatingDiff "+14"] [Variant "Standard"] [TimeControl "1200+7"] [ECO "D10"] [Opening "Slav Defense"] [Termination "Normal"]

  1. d4 d5 2. c4 c6 3. Nc3 Nf6 4. cxd5 cxd5 5. Nf3 a6 6. Bf4 Nc6 7. e3 Bg4 8. Qb3 Bxf3 9. gxf3 Na5 10. Qa4+ Nc6 11. Bd3 e6 12. h4 Be7 13. h5 h6 14. O-O-O b5 15. Qc2 O-O 16. Rdg1 Kh8 17. Kb1 Qa5 18. Rg2 Rac8 19. Qd1 Nb4 20. a3 Nxd3 21. Qxd3 Bxa3 22. Rhg1 Rg8 23. Bxh6 gxh6 24. Rxg8+ Nxg8 0-1

Could you help me on this ? Thanks

vitogit commented 1 year ago

Try to remove the --quiet param to see if is working. Try --strict=False to make it less strict. Probably you need much more games to get some puzzles.

jhfide commented 1 year ago

Thanks for your response.

I have applied above.

I got many similar messages like below and program stopped after Puzzle incomplete.

... and 26 more moves Not Going Deeper: Ambiguous: True Game Over: False Has Best Move: True Puzzle incomplete pgn-tactics-generator %

This pgn should generate some puzzles as it generated some puzzles from http://chesstacticsgenerator.vitomd.com

Is there anything else I can try ?


[SetUp "0"] [FEN "r1bq1rk1/4npb1/p1np4/2p1p2p/Pp2P2P/2PPNpB1/BP4PN/R2QK2R w KQ - 0 18"] [Site "https://lichess.org/EHvKbmgM"] [Date "2023.5.30"] [White "characterdevelopment"] [Black "qh22"] [Result "0-1"] [Termination "52"]

  1. Qxf3 Rb8 19. Bc4 Na5 20. Qxh5 Nxc4 21. Nxc4 Be6 22. cxb4 Rxb4 23. O-O Qd7 24. Be1 Bxc4 25. Bxb4 0-1

    [Event "Monthly SuperBlitz Arena"] [Site "https://lichess.org/EHvKbmgM"] [Date "2023.05.30"] [White "characterdevelopment"] [Black "qH22"] [Result "0-1"] [UTCDate "2023.05.30"] [UTCTime "18:12:54"] [WhiteElo "1955"] [BlackElo "1988"] [WhiteRatingDiff "-5"] [BlackRatingDiff "+13"] [Variant "Standard"] [TimeControl "180+0"] [ECO "B50"] [Opening "Sicilian Defense: Modern Variations"] [Termination "Time forfeit"]

  2. e4 c5 2. Nf3 d6 3. Bc4 g6 4. d3 Bg7 5. c3 Nc6 6. a4 e6 7. Nbd2 Nge7 8. Ba2 O-O 9. Nc4 a6 10. Bf4 e5 11. Bg5 b5 12. Ne3 h6 13. Bh4 g5 14. Bg3 b4 15. h4 g4 16. Nh2 h5 17. f3 gxf3 18. Qxf3 bxc3 19. bxc3 Qa5 20. Kd2 Rb8 21. Nc4 Qxa4 22. Qxh5 Ng6 23. Ke3 Be6 24. Ng4 Qc2 25. Nh6+ Bxh6+ 26. Qxh6 Qxg2 27. Rhg1 Qh3 28. h5 Nce7 29. Qg5 f6 30. Qh6 f5 31. Nxd6 Bxa2 32. Nxf5 Nxf5+ 33. exf5 Nf4 34. Kd2 Rb2+ 35. Kc1 Ne2+ 36. Kd1 Nxg1 0-1

vitogit commented 1 year ago

This pgn should generate some puzzles as it generated some puzzles from http://chesstacticsgenerator.vitomd.com/

No, this script is a lot more strict. Is to generate puzzles, is not just check for blunders, it check that there is only one good solution in the position, that is not ambiguous, etc.

So to generate puzzles you need a lot of games with blunders. Probably if you use a pgn with 50 games you will get some puzzles.

jhfide commented 1 year ago

Thank you .

I got some 5 puzzles after running 60 games.