Coder Social home page Coder Social logo

Comments (6)

fsmosca avatar fsmosca commented on September 23, 2024

I will implement this with --lichess flag.

from python-chess-scripts.

fsmosca avatar fsmosca commented on September 23, 2024

plot.py --input lichess1.pgn --lichess

from python-chess-scripts.

fsmosca avatar fsmosca commented on September 23, 2024

Lichess games with mate scores.

v0.18.0

plot.py --input ./pgn/lichess2.pgn --lichess --min-eval-limit -400 --max-eval-limit 400

mate

from python-chess-scripts.

rwbc avatar rwbc commented on September 23, 2024

I get an error with a lichess pgn starting at line 135, for this game (#scores = game3 in the full pgn)
Probably I should have included more examples for lichess games in the beginning.
I have attached one for a closed account of mine with 3-0 games (236 games)

[Event "Rated Blitz game"]
[Site "https://lichess.org/0qEzbV0U"]
[Date "2020.05.30"]
[White "andreygubkin"]
[Black "osterei"]
[Result "1-0"]
[UTCDate "2020.05.30"]
[UTCTime "18:52:56"]
[WhiteElo "2131"]
[BlackElo "2094"]
[WhiteRatingDiff "+5"]
[BlackRatingDiff "-5"]
[Variant "Standard"]
[TimeControl "180+0"]
[ECO "A45"]
[Termination "Normal"]

1. d4 { [%eval 0.25] [%clk 0:03:00] } 1... Nf6 { [%eval 0.22] [%clk 0:03:00] } 2. Bf4 { [%eval 0.0] [%clk 0:03:00] } 2... c5 { [%eval 0.18] [%clk 0:02:59] } 3. c3 { [%eval -0.5] [%clk 0:02:58] } 3... Nc6 { [%eval 0.63] [%clk 0:02:58] } 4. e3 { [%eval 0.0] [%clk 0:02:58] } 4... d5 { [%eval 0.0] [%clk 0:02:57] } 5. Bd3 { [%eval -0.21] [%clk 0:02:57] } 5... e6 { [%eval 0.0] [%clk 0:02:56] } 6. Nd2 { [%eval -0.26] [%clk 0:02:56] } 6... Bd6 { [%eval 0.0] [%clk 0:02:55] } 7. Bxd6 { [%eval 0.0] [%clk 0:02:55] } 7... Qxd6 { [%eval 0.0] [%clk 0:02:54] } 8. f4 { [%eval 0.2] [%clk 0:02:55] } 8... c4 { [%eval 0.13] [%clk 0:02:53] } 9. Bc2 { [%eval 0.27] [%clk 0:02:50] } 9... b5 { [%eval 0.33] [%clk 0:02:52] } 10. Ngf3 { [%eval 0.47] [%clk 0:02:49] } 10... Bb7 { [%eval 0.53] [%clk 0:02:50] } 11. O-O { [%eval 0.35] [%clk 0:02:46] } 11... h6 { [%eval 0.77] [%clk 0:02:44] } 12. Ne5 { [%eval 0.69] [%clk 0:02:45] } 12... O-O { [%eval 1.43] [%clk 0:02:37] } 13. Ndf3 { [%eval 0.26] [%clk 0:02:44] } 13... Ne4 { [%eval 0.28] [%clk 0:02:35] } 14. Qb1 { [%eval -0.62] [%clk 0:02:37] } 14... f5 { [%eval 1.16] [%clk 0:02:34] } 15. Nxc6 { [%eval 0.79] [%clk 0:02:33] } 15... Bxc6 { [%eval 0.9] [%clk 0:02:32] } 16. Bxe4 { [%eval 0.91] [%clk 0:02:33] } 16... dxe4 { [%eval 0.92] [%clk 0:02:28] } 17. Ne5 { [%eval 0.9] [%clk 0:02:32] } 17... Be8 { [%eval 1.42] [%clk 0:02:27] } 18. Qd1 { [%eval 1.28] [%clk 0:02:30] } 18... Rb8 { [%eval 1.63] [%clk 0:02:26] } 19. g4 { [%eval 1.06] [%clk 0:02:24] } 19... a5 { [%eval 1.41] [%clk 0:02:19] } 20. g5 { [%eval 0.94] [%clk 0:02:15] } 20... h5 { [%eval 7.21] [%clk 0:02:17] } 21. h4 { [%eval 2.69] [%clk 0:02:13] } 21... g6 { [%eval 2.86] [%clk 0:02:15] } 22. Kg2 { [%eval 2.26] [%clk 0:02:11] } 22... Kg7 { [%eval 2.62] [%clk 0:02:15] } 23. Kg3 { [%eval 1.37] [%clk 0:02:10] } 23... Bf7 { [%eval 2.53] [%clk 0:02:09] } 24. b3 { [%eval 2.38] [%clk 0:02:09] } 24... Rfc8 { [%eval 3.46] [%clk 0:02:07] } 25. bxc4 { [%eval 3.09] [%clk 0:02:07] } 25... bxc4 { [%eval 3.23] [%clk 0:02:06] } 26. Rb1 { [%eval 2.72] [%clk 0:02:06] } 26... Qa3 { [%eval 3.04] [%clk 0:01:55] } 27. Qc2 { [%eval 3.33] [%clk 0:01:59] } 27... Be8 { [%eval 3.26] [%clk 0:01:48] } 28. Rxb8 { [%eval 3.45] [%clk 0:01:53] } 28... Rxb8 { [%eval 3.34] [%clk 0:01:47] } 29. Rb1 { [%eval 0.0] [%clk 0:01:33] } 29... Ba4 { [%eval 0.0] [%clk 0:01:44] } 30. Qc1 { [%eval 0.1] [%clk 0:01:24] } 30... Qxc1 { [%eval 0.0] [%clk 0:01:42] } 31. Rxc1 { [%eval 0.0] [%clk 0:01:23] } 31... Rb2 { [%eval 0.16] [%clk 0:01:30] } 32. Nxc4 { [%eval 0.47] [%clk 0:01:21] } 32... Rxa2 { [%eval 0.9] [%clk 0:01:29] } 33. Nxa5 { [%eval 0.0] [%clk 0:01:19] } 33... Re2 { [%eval 0.0] [%clk 0:01:19] } 34. Nc4 { [%eval 0.0] [%clk 0:01:15] } 34... Bc2 { [%eval 0.0] [%clk 0:01:13] } 35. Ra1 { [%eval 0.0] [%clk 0:01:06] } 35... Bd3 { [%eval 0.01] [%clk 0:01:12] } 36. Ne5 { [%eval 0.03] [%clk 0:01:03] } 36... Rxe3+ { [%eval 0.69] [%clk 0:01:08] } 37. Kf2 { [%eval 0.34] [%clk 0:01:02] } 37... Rh3 { [%eval 2.85] [%clk 0:01:07] } 38. Ra7+ { [%eval 1.08] [%clk 0:00:59] } 38... Kf8 { [%eval 2.33] [%clk 0:01:05] } 39. Nxg6+ { [%eval 1.35] [%clk 0:00:58] } 39... Ke8 { [%eval 3.3] [%clk 0:01:03] } 40. Re7+ { [%eval 2.58] [%clk 0:00:54] } 40... Kd8 { [%eval 3.33] [%clk 0:01:02] } 41. Rxe6 { [%eval 2.84] [%clk 0:00:53] } 41... Rf3+ { [%eval 3.15] [%clk 0:01:01] } 42. Ke1 { [%eval -4.58] [%clk 0:00:51] } 42... Re3+ { [%eval 3.99] [%clk 0:00:57] } 43. Kd2 { [%eval 3.07] [%clk 0:00:49] } 43... Re2+ { [%eval 3.2] [%clk 0:00:56] } 44. Kc1 { [%eval 0.0] [%clk 0:00:48] } 44... Rc2+ { [%eval 4.0] [%clk 0:00:55] } 45. Kd1 { [%eval 3.83] [%clk 0:00:47] } 45... Rxc3 { [%eval 3.65] [%clk 0:00:54] } 46. Rd6+ { [%eval 2.07] [%clk 0:00:40] } 46... Kc7 { [%eval 2.02] [%clk 0:00:53] } 47. Rd5 { [%eval 1.94] [%clk 0:00:39] } 47... e3 { [%eval 8.07] [%clk 0:00:51] } 48. Ne5 { [%eval 0.0] [%clk 0:00:31] } 48... Be4 { [%eval 9.25] [%clk 0:00:49] } 49. Rd7+ { [%eval 3.35] [%clk 0:00:21] } 49... Kc8 { [%eval 2.96] [%clk 0:00:47] } 50. Rh7 { [%eval 0.19] [%clk 0:00:21] } 50... Bf3+ { [%eval 18.93] [%clk 0:00:39] } 51. Nxf3 { [%eval 16.98] [%clk 0:00:16] } 51... e2+ { [%eval #17] [%clk 0:00:37] } 52. Kxe2 { [%eval #16] [%clk 0:00:15] } 52... Rc2+ { [%eval #16] [%clk 0:00:36] } 53. Kd3 { [%eval #15] [%clk 0:00:13] } 53... Rf2 { [%eval #15] [%clk 0:00:35] } 54. Ke3 { [%eval #14] [%clk 0:00:11] } 54... Rg2 { [%eval #14] [%clk 0:00:33] } 55. Ne5 { [%eval #13] [%clk 0:00:10] } 55... Rg3+ { [%eval #16] [%clk 0:00:33] } 56. Kf2 { [%eval #17] [%clk 0:00:09] } 56... Rg4 { [%eval #6] [%clk 0:00:32] } 57. Nxg4 { [%eval #5] [%clk 0:00:07] } 57... hxg4 { [%eval #5] [%clk 0:00:31] } 58. Kg3 { [%eval #4] [%clk 0:00:07] } 58... Kd8 { [%eval #4] [%clk 0:00:29] } 59. Rg7 { [%eval #4] [%clk 0:00:06] } 59... Ke8 { [%eval #4] [%clk 0:00:29] } 60. h5 { [%eval #3] [%clk 0:00:06] } 60... Kf8 { [%eval #3] [%clk 0:00:29] } 61. h6 { [%eval #2] [%clk 0:00:06] } 61... Ke8 { [%eval #2] [%clk 0:00:26] } 62. d5 { [%eval #3] [%clk 0:00:06] } 62... Kf8 { [%eval #3] [%clk 0:00:25] } 63. d6 { [%eval #2] [%clk 0:00:06] } 63... Ke8 { [%eval #2] [%clk 0:00:25] } 64. d7+ { [%eval #5] [%clk 0:00:05] } 64... Kd8 { [%eval #5] [%clk 0:00:24] } 65. h7 { [%eval #4] [%clk 0:00:05] } 65... Kc7 { [%eval #4] [%clk 0:00:24] } 66. h8=Q { [%eval #3] [%clk 0:00:04] } 66... Kd6 { [%eval #3] [%clk 0:00:24] } 67. Qh7 { [%eval #4] [%clk 0:00:04] } 67... Kd5 { [%eval #3] [%clk 0:00:23] } 68. Re7 { [%eval #3] [%clk 0:00:03] } 68... Kd4 { [%eval #3] [%clk 0:00:22] } 69. d8=Q+ { [%eval #2] [%clk 0:00:03] } 69... Kc3 { [%eval #2] [%clk 0:00:21] } 70. Rc7+ { [%eval #2] [%clk 0:00:03] } 70... Kb4 { [%eval #2] [%clk 0:00:19] } 71. Qb8+ { [%eval #1] [%clk 0:00:03] } 71... Ka3 { [%eval #1] [%clk 0:00:17] } 72. Ra7# { [%clk 0:00:03] } 1-0
C:\ChessTools\QualityControl\Plot_PGN>python C:\ChessTools\QualityControl\Plot_PGN\plot.py --lichess --min-eval-limit -800 --max-eval-limit 800 --input C:\ChessTools\QualityControl\Plot_PGN\PGN\lichess_osterei_2020-12-27
.pgn  1>log.txt
Traceback (most recent call last):
  File "C:\ChessTools\QualityControl\Plot_PGN\plot.py", line 436, in <module>
    main()
  File "C:\ChessTools\QualityControl\Plot_PGN\plot.py", line 432, in main
    a.run()
  File "C:\ChessTools\QualityControl\Plot_PGN\plot.py", line 346, in run
    self.plotter(game, output)
  File "C:\ChessTools\QualityControl\Plot_PGN\plot.py", line 238, in plotter
    move_eval = self.get_eval(comment, parent_board.turn, ply, b_eval, w_eval)
  File "C:\ChessTools\QualityControl\Plot_PGN\plot.py", line 135, in get_eval
    split_eval = comment.split('%eval ')[1].split(']')[0]
IndexError: list index out of range

lichess_osterei_2020-12-27.zip

from python-chess-scripts.

fsmosca avatar fsmosca commented on September 23, 2024

Game is over, no eval, I will fix this.

from python-chess-scripts.

fsmosca avatar fsmosca commented on September 23, 2024

This is now fixed in v0.22.0.

Tried all the 236 games in lichess_osterei and there are no error messages.

from python-chess-scripts.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.