How to post chess games

General discussion about computer chess...
Post Reply
pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Tue Jun 22, 2010 11:43 am

kingliveson wrote:
hyatt wrote:Seems to be a bug that causes moves ending with + (check) to generate an error that prevents advancing beyond that move... It seems to specifically affect only pawn moves, such as c4+ while piece checks seem to be OK.

Anyone else noticed this?
Just noticed now that you said it. I posted a list of pgns and one has this bug.
you are right, for instance this PGN generates the problem:

e4 d5 Ke2 d4 a3 d3+ Ke1

It's related to Jeremy's customizations, I guess the portion that adds + and # chars to the game. That PGN works fine with the original pgn4web code.

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Wed Jun 23, 2010 3:34 pm

UncombedCoconut wrote:Agreed, it would be nice if it quietly displayed an error message in the chessboard's place.
I find it annoying to open several threads in background tabs and have one pop to the foreground because an alert thought it needed my attention. Sure, it needs the attention, but (IMO) from the poster and not the reader.
Had second thoughts about this and I'm heading towards a softer way to handle exceptions.
The new behavior, for instance when an incorrect move is found in the PGN game, will be:
- the error is logged
- no popup alert is automatically shown
- the chessboard is still shown (obviously up to the bogus move)
- the chessboard starts gently to signal the exception, some colors flashing in the chessboard every 10 seconds or so, not much intrusive but noticeable
- clicking on square A8 the error log can be reviewed

Same for incorrect FEN strings and for failures to read the pgn data.

A new version of the tool should be out in few days for jeremy to review.

Paolo

User avatar
kingliveson
Posts: 1388
Joined: Thu Jun 10, 2010 1:22 am
Real Name: Franklin Titus
Location: 28°32'1"N 81°22'33"W

Re: How to post chess games

Post by kingliveson » Wed Jun 23, 2010 3:38 pm

pgn4web wrote:
UncombedCoconut wrote:Agreed, it would be nice if it quietly displayed an error message in the chessboard's place.
I find it annoying to open several threads in background tabs and have one pop to the foreground because an alert thought it needed my attention. Sure, it needs the attention, but (IMO) from the poster and not the reader.
Had second thoughts about this and I'm heading towards a softer way to handle exceptions.
The new behavior, for instance when an incorrect move is found in the PGN game, will be:
- the error is logged
- no popup alert is automatically shown
- the chessboard is still shown (obviously up to the bogus move)
- the chessboard starts gently to signal the exception, some colors flashing in the chessboard every 10 seconds or so, not much intrusive but noticeable
- clicking on square A8 the error log can be reviewed

Same for incorrect FEN strings and for failures to read the pgn data.

A new version of the tool should be out in few days for jeremy to review.

Paolo
Thanks, your work is very much appreciated.
PAWN : Knight >> Bishop >> Rook >>Queen

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Wed Jun 23, 2010 4:02 pm

kingliveson wrote:Thanks, your work is very much appreciated.
Here you have an example of the new behaviour:
http://pgn4web-test.casaschi.net/phpbb/ ... hp?f=2&t=7

User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: How to post chess games

Post by Uly » Wed Jun 23, 2010 6:12 pm

pgn4web wrote:- no popup alert is automatically shown
Thank you!

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: How to post chess games

Post by Jeremy Bernstein » Wed Jun 23, 2010 6:51 pm

pgn4web wrote:
kingliveson wrote:
hyatt wrote:Seems to be a bug that causes moves ending with + (check) to generate an error that prevents advancing beyond that move... It seems to specifically affect only pawn moves, such as c4+ while piece checks seem to be OK.

Anyone else noticed this?
Just noticed now that you said it. I posted a list of pgns and one has this bug.
you are right, for instance this PGN generates the problem:

e4 d5 Ke2 d4 a3 d3+ Ke1

It's related to Jeremy's customizations, I guess the portion that adds + and # chars to the game. That PGN works fine with the original pgn4web code.
Crap. OK, I'm returning to the non-customized version for now -- I'm in an internet hole in Greek Chalkidiki right now, so I'll deal with this next week.

Hagen
Posts: 121
Joined: Mon Jun 14, 2010 12:30 am

Re: How to post chess games

Post by Hagen » Wed Jun 23, 2010 11:04 pm

What about Shuffle Chess or Fischer Random Chess positions? I've been trying to get the code to work for this and I get errors. Any ideas on that? Fischer Random Chess is a must.

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: How to post chess games

Post by pgn4web » Thu Jun 24, 2010 8:02 pm

Hagen wrote:What about Shuffle Chess or Fischer Random Chess positions? I've been trying to get the code to work for this and I get errors. Any ideas on that? Fischer Random Chess is a must.
Fischer Random, Shuffle Chess and other variants are not supported. My tool is just about classical chess and there's no plan at the moment for anything else, sorry.

What breaks with Fischer Random and other variant that only have a different starting position are the castling rules. You can start the game from an arbitrary position using the SetUp and the FEN PGN tags, but the castling O-O and O-O-O wont be properly recognized.

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: How to post chess games

Post by Jeremy Bernstein » Mon Jun 28, 2010 11:52 am

Jeremy Bernstein wrote:
pgn4web wrote:
kingliveson wrote:
hyatt wrote:Seems to be a bug that causes moves ending with + (check) to generate an error that prevents advancing beyond that move... It seems to specifically affect only pawn moves, such as c4+ while piece checks seem to be OK.

Anyone else noticed this?
Just noticed now that you said it. I posted a list of pgns and one has this bug.
you are right, for instance this PGN generates the problem:

e4 d5 Ke2 d4 a3 d3+ Ke1

It's related to Jeremy's customizations, I guess the portion that adds + and # chars to the game. That PGN works fine with the original pgn4web code.
Crap. OK, I'm returning to the non-customized version for now -- I'm in an internet hole in Greek Chalkidiki right now, so I'll deal with this next week.
OK, I've fixed the bug and merged in Paolo's changes for 2.0.2:
pgn4web wrote:Had second thoughts about this and I'm heading towards a softer way to handle exceptions.
The new behavior, for instance when an incorrect move is found in the PGN game, will be:
- the error is logged
- no popup alert is automatically shown
- the chessboard is still shown (obviously up to the bogus move)
- the chessboard starts gently to signal the exception, some colors flashing in the chessboard every 10 seconds or so, not much intrusive but noticeable
- clicking on square A8 the error log can be reviewed

Same for incorrect FEN strings and for failures to read the pgn data.
This is looking good for me. Please let me know if you run into any issues.

Jeremy

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: How to post chess games

Post by Jeremy Bernstein » Mon Jun 28, 2010 11:55 am

There was a recent post which was throwing errors when attempting to display a board which began at move 23, white to move. If you want to post such a game excerpt, you need to do it as follows:

Code: Select all

[pgn]
[FEN "r2r2k1/5p1n/1pp1b2Q/p1p5/q3P2N/3P3P/1PP3P1/3RR1K1 w - - 0 23"]
[SetUp "1"]
23. Nf3! Qb4 24. Re3 Qxb2
25. e5 Qxc2 26. Rf1 Rxd3 27. Ne1 Rxe3 28. Nxc2 Rxe5 29. Qf4 f6 30. Qg3+ Rg5 31.
Qc7 Bxh3 32. Rf2 Rc8 33. Qxb6 Be6 34. Re2
[/pgn]
You need both the "FEN" and "SetUp" tags in order for this to work.

[FEN "r2r2k1/5p1n/1pp1b2Q/p1p5/q3P2N/3P3P/1PP3P1/3RR1K1 w - - 0 23"]
[SetUp "1"]
23. Nf3! Qb4 24. Re3 Qxb2
25. e5 Qxc2 26. Rf1 Rxd3 27. Ne1 Rxe3 28. Nxc2 Rxe5 29. Qf4 f6 30. Qg3+ Rg5 31.
Qc7 Bxh3 32. Rf2 Rc8 33. Qxb6 Be6 34. Re2

Hope this helps,
Jeremy

Post Reply