yo35 / rpb-chessboard

A WordPress plugin to display chess games and diagrams (using the standard FEN and PGN notations).
https://wordpress.org/plugins/rpb-chessboard/
GNU General Public License v3.0
35 stars 16 forks source link

My PGN doesn't work with your chessboard (but works in other PGN viewers). #55

Closed AutoDMC closed 8 years ago

AutoDMC commented 8 years ago

I'm hand annotating my horrible, horrible game below, and it works in ChessTempo's viewer and "Embed Chessboard" but chokes in your viewer, which is very unfortunate because I much prefer your viewer!

It seems to be choking around move 22. If I remove everything after move 21 (including move 21's comment) it seems to work fine, but I don't know what inside that block is choking your parser.

Please let me know if there's anything I can do to make this bug report better.

` [pgn_compat]

[Event "Correspondence Chess"] [Site "Chess.com"] [Date "2016.03.11"] [White "kilote"] [Black "AutoDMC"] [Result "1-0"] [WhiteElo "972"] [BlackElo "826"] [TimeControl "1 in 5 days"] [Termination "kilote won by checkmate"] [CurrentPosition "rnbqkb1r/ppp1pppp/5n2/3p4/4P3/3P1N2/PPP2PPP/RNBQKB1R b KQkq - 0 3"]

1.e4 Nf6 2.d3 d5

{I'm told this is the "Alekhine Defense: Maroczy Variation." My intent here was simply to put as many attacks on the center squares as I could. White's doing the same, but also opening up for his bishop and queen to develop, while my pieces are still bottled up. Immediately, however, I go off the rails. My only consolation is that the computer doesn't think very highly of my opponent at this time either.}

3.Nf3 g6? 4.h4 c6?

{My plan at this point was to fianchetto my f-rank bishop to add more tension on the center. First obvious problem here: a fianchetto'd bishop is blocked by my knight anyway (or I can give myself credit and claim I'm "protecting" it). At this point, I'm uncomfortable with my d pawn just sitting out there, so I decide to protect it with my c pawn. In this time, my opponent has brought out a knight and his h pawn. Not sure what's up with that h-pawn, and neither does the computer. Chess.com projects an exchange of queens, Stockfish suggests a future where I don't bring out the c-pawn where I get to capture his pawn trade on the d file with my knight, further deveoping. D'oh!}

5.c4 Bg7??

(5... dxe4 4.Ne5 Nbd7 5.Nxd7 Bxd7 {wins material})

6.Bf4 Nfd7??

(6... dxe4 7.Nh2 Nh5 8.Bc1 exd3 9.Bxd3 Na6 {wins material AND develops})

7.g3 c5?? 8.Nc3 Nb6??

{Stockfish HATES these moves, but Chess.com is more polite. I was so obsessed with fianchettoing my bishop that I completely went stupid. Stockfish suggests a trade of pawns, to gain material. Both chess engines say I should have been more aggressive, and I agree, with hindsight. I really wanted that fianchetto'd bishop, I couldn't wait!}

9.cxd5 e6 10.Qb3 O-O 11.O-O-O Qe8??

{After a tame couple of decent moves, I up and throw some extra points in Black's favor. I'm already behind in development, and I spend the rest of the game trying to dig myself out of this hole I'm in. The worst part is, I don't even know what possessed me to shuffle my queen.}

(11... exd5 {considered the least bad of my options by both engines} 12.Bg5 Qc7 13.Nxd5 Nxd5 {trade of knights} 14.exd5 Bg4 15.Bg2 Nd7 {actually some ?!?!?! development here.})

12.Bh3 Bd7? 13.Bc7 Qc8! {Stockfish is being nice. "This is literally the best way you could have screwed up here. Good job!"} 14.d6 c4 15.dxc4 Qe8?? {It's a good thing computers don't have emotions, Stockfish would be throttling me right now. I really don't know why I went so stupid.}

16.c5 Na4! 17.e5 f6??

({Chess.com recommends} 17... Na6 {and I see the point; right now I've got a weak threat against e5, when I could have had a threat on c5 followed by a credible threat against his queen.})

18.Nd5 fxe5?? {Gentlemen do not take knights when they can have pawns... apparently? I was protecting my bishop, but at this point pretty much everything I do helps White; computer analysis doesn't give me a value in my favor for the rest of the game.} 19.Ng5 h6?? {Why take a knight on d5 when you can just threaten? Again, I'm trying to protect my bishop on d7, but I taking it would just be an exchange when I get it back with my currently worthless knight on b8!}

20.Ne7+ Kh8 21.Nxe6 Rxf2? {Pure revenge fantasy. Take that, pawn! Then again, I could have taken the threatening knight on e6 with my bishop, trading it against his queen.}

22.Rhf1 Rf6?? {Retreat!!!}

(22... Qf7 {is recommended by Stockfish. This makes sense to me, use the Queen to shore up the rook in case of trades. I was afraid of f8, and forgot the queen moves like a rook AND bishop.})

(22... rxb2 {is recommended by Chess.com, but I disagree. I don't think White would have left the threat against his queen as long as Chess.com thinks he would.})

23.Qxb7 Nc6?? 24.Nxg7 Kxg7! {Again, my bishop on d7 could have been useful by killing the knight on e6, but I'm in full panic retreat I'm just trying to salvage material, and by doing so I'm losing even more material. Rook sacrifice for a knight? At least I startle Stockfish by not screwing up at the maximum value here. By this point, I knew what Chess.com is saying to me in the analysis; White is won but for a miracle.} 25.Bxd7 Qxd7?? ({I could have sent the king on a merry chase} 25... Qf7 26. Rxf6 Qc4+ 27. Kd2 Qd4+ 28. Ke2 Qe4+ 29. Kf1 Qh1+ 30. Kf2 {but I panic again. Chess.com considers this a 20 point blunder!}).

26.Qxa8 Rf8?? {The rest of the game is just me flailing around to avoid a direct checkmate.} 27.Rxf8 Nd4 28.Rdf1 Nf5 29.R8xf5 gxf5 30.Qg8+ Kf6 31.Rxf5+ Qxf5 32.Nxf5 Kxf5 33.d7 Nxc5 34.d8=Q Ke4 35.Qdd5+ Kf5 36.Qxc5 Ke4 37.Qg4+ Kd3 38.Bxe5 h5 39.Qgd4+ Ke2 40.Qc2+ Kf3 41.Qcf2# 1-0

[/pgn_compat] `

yo35 commented 8 years ago

Hi, Thanks for your report. It seems however that there are some mistakes in your PGN:

AutoDMC commented 8 years ago

I think that's got it. I was having a hard time figuring out the error messages, and considering that it was rendering in The Other Wordpress Plugin I thought it was a parsing error.

Thanks for looking. I need to find a better way to edit my PGNs than trying by hand.