Test

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28315
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Test

Post by hgm »

[d]rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
[d] rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
[pgn][Event "Computer Chess Game"]
[Site "MAKRO-PC"]
[Date "2014.11.15"]
[Round "-"]
[White "Spartacus 1.01 t"]
[Black "Shredder"]
[Result "0-1"]
[TimeControl "3300"]
[Annotator "9. +0.11"]

1. e4 c5 2. c3 Nf6 3. e5 Nd5 4. Nf3 e6 5. d4 cxd4 6. cxd4 d6 7. Bc4 Nb6 8.
Bd3 Nc6 9. O-O {+0.11/17 1:44} Nb4 10. Bg5 {+0.23/17 1:03} Be7 11. Bxe7
{+0.16/18 1:10} Qxe7 12. exd6 {+0.15/18 1:28} Qxd6 13. Nc3 {+0.15/18 1:17}
O-O 14. Ng5 {+0.16/16 1:02} g6 15. Bb5 {+0.34/16 1:35} Qe7 16. f4
{+0.26/17 1:37} Rd8 17. Nf3 {+0.20/16 56} Bd7 18. Bxd7 {+0.17/17 58} Rxd7
19. Qb3 {+0.10/16 1:22} Nc6 20. Rad1 {+0.14/17 1:43} Qd8 21. Ne2
{+0.16/17 40} Rc8 22. Rd3 {+0.17/16 47} a6 23. Kh1 {+0.25/16 41} Nd5 24.
Ne5 {+0.07/17 1:15} Rdc7 25. Rdf3 {-0.08/18 1:12} Na5 26. Qd1 {-0.05/17 50}
Nc4 27. Nxc4 {-0.05/17 42} Rxc4 28. Qb1 {-0.20/17 50} Qd7 29. Rd3
{-0.09/16 37} b5 30. Rff3 {-0.18/16 37} Qc6 31. Kg1 {-0.42/16 36} b4 32.
Kf1 {-0.66/17 46} Qb5 33. Ke1 {-0.63/17 57} Rc2 34. Rd2 {-0.29/17 32} Rxd2
35. Kxd2 {-0.34/17 32} Qa5 36. Rb3 {-0.38/17 39} Qc7 37. Rf3 {-0.28/17 54}
a5 38. Qc1 {-0.30/16 53} Qd7 39. Qb1 {-0.38/16 30} a4 40. Qd1 {-0.44/17 50}
Qc6 41. h3 {-0.63/16 46} Ne7 42. Qb1 {-0.75/17 1:04} Nf5 43. Qd3
{-0.67/17 28} Qd5 44. Qa6 {-0.88/17 43} Rc4 45. Kd3 {-1.47/16 1:13} Rc6 46.
Qa7 {-2.48/16 40} Kg7 47. Qxa4 {-2.96/17 44} Qc4+ 48. Kd2 {-3.44/17 41}
Nxd4 49. Rd3 {-3.87/16 44} Nxe2 50. Kxe2 {-4.78/15 29} Qe4+ 51. Kf2
{-5.87/15 1:02} Qxf4+ 52. Ke2 {-5.85/14 50} Qe4+ 53. Kf2 {-5.82/14 33} Rc1
54. Qb3 {-6.01/13 14} Qe1+ 55. Kf3 {-6.17/14 37} e5 56. Rd4 {-6.85/13 15}
Rc6 57. Rf4 {-8.43/12 13} exf4 58. h4 {-19.68/15 43} Rc3+ 59. Qxc3+
{-319.94/100 8} bxc3 60. g3 {-319.95/100 0.1} Qe3+ 61. Kg2
{-319.96/100 0.1} Qxg3+ 62. Kf1 {-319.97/100 0.1} cxb2 63. a3 {-319.98/100}
b1=Q+ 64. Ke2 {-319.99/100} Qbd3#
{Xboard adjudication: Checkmate} 0-1
[/pgn]

Code: Select all

for(p=0; p<10; p++) a[p] = 1;
for(i=0; i<10; i++) a[i] = 1;
[d]RN/nr')); document.write(('Got you!
theme=MV firstRank=1 theme=BP
files=10
ranks=10
promoZone=3
hole::::a1-c2,a3,b3,a4,d1,g1,h1-j2,i3,j3,j4
Pawn::fmW*fceF::c3,d3,e4,f4,g3,h3
Knight:N:::e3,f3
Bishop::::e2,f2
Rook::::d2,g2
Queen::::e1
King::K::f1
variant=FIDE theme=SV enableAI=0

Move history

smatovic
Posts: 3137
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Test

Post by smatovic »

Fixed "[d / ]" to [d] parser in backend.

Did not implement [fen] tag parsing.

--
Srjda
User avatar
hgm
Posts: 28315
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Test

Post by hgm »

Ah. The fen tags is what we have been using since the infamous upgrade to phpBB 3, and there used to be a button for it. The d tags are a deprecated legacy from the old phpBB 2 forum.

There appears to be a problem with the parsing of the d tag when something follows it.

[Edit] It seems it parses a HTML <br> tag that is appended to the FEN line in the Page Source. I suppose fen.js could be modified to stop at a < character.
User avatar
Ajedrecista
Posts: 2075
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Test.

Post by Ajedrecista »

Hello:
hgm wrote: Fri Mar 01, 2024 9:50 am [d]rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
[d] rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
[pgn][Event "Computer Chess Game"]
[Site "MAKRO-PC"]
[Date "2014.11.15"]
[Round "-"]
[White "Spartacus 1.01 t"]
[Black "Shredder"]
[Result "0-1"]
[TimeControl "3300"]
[Annotator "9. +0.11"]

1. e4 c5 2. c3 Nf6 3. e5 Nd5 4. Nf3 e6 5. d4 cxd4 6. cxd4 d6 7. Bc4 Nb6 8.
Bd3 Nc6 9. O-O {+0.11/17 1:44} Nb4 10. Bg5 {+0.23/17 1:03} Be7 11. Bxe7
{+0.16/18 1:10} Qxe7 12. exd6 {+0.15/18 1:28} Qxd6 13. Nc3 {+0.15/18 1:17}
O-O 14. Ng5 {+0.16/16 1:02} g6 15. Bb5 {+0.34/16 1:35} Qe7 16. f4
{+0.26/17 1:37} Rd8 17. Nf3 {+0.20/16 56} Bd7 18. Bxd7 {+0.17/17 58} Rxd7
19. Qb3 {+0.10/16 1:22} Nc6 20. Rad1 {+0.14/17 1:43} Qd8 21. Ne2
{+0.16/17 40} Rc8 22. Rd3 {+0.17/16 47} a6 23. Kh1 {+0.25/16 41} Nd5 24.
Ne5 {+0.07/17 1:15} Rdc7 25. Rdf3 {-0.08/18 1:12} Na5 26. Qd1 {-0.05/17 50}
Nc4 27. Nxc4 {-0.05/17 42} Rxc4 28. Qb1 {-0.20/17 50} Qd7 29. Rd3
{-0.09/16 37} b5 30. Rff3 {-0.18/16 37} Qc6 31. Kg1 {-0.42/16 36} b4 32.
Kf1 {-0.66/17 46} Qb5 33. Ke1 {-0.63/17 57} Rc2 34. Rd2 {-0.29/17 32} Rxd2
35. Kxd2 {-0.34/17 32} Qa5 36. Rb3 {-0.38/17 39} Qc7 37. Rf3 {-0.28/17 54}
a5 38. Qc1 {-0.30/16 53} Qd7 39. Qb1 {-0.38/16 30} a4 40. Qd1 {-0.44/17 50}
Qc6 41. h3 {-0.63/16 46} Ne7 42. Qb1 {-0.75/17 1:04} Nf5 43. Qd3
{-0.67/17 28} Qd5 44. Qa6 {-0.88/17 43} Rc4 45. Kd3 {-1.47/16 1:13} Rc6 46.
Qa7 {-2.48/16 40} Kg7 47. Qxa4 {-2.96/17 44} Qc4+ 48. Kd2 {-3.44/17 41}
Nxd4 49. Rd3 {-3.87/16 44} Nxe2 50. Kxe2 {-4.78/15 29} Qe4+ 51. Kf2
{-5.87/15 1:02} Qxf4+ 52. Ke2 {-5.85/14 50} Qe4+ 53. Kf2 {-5.82/14 33} Rc1
54. Qb3 {-6.01/13 14} Qe1+ 55. Kf3 {-6.17/14 37} e5 56. Rd4 {-6.85/13 15}
Rc6 57. Rf4 {-8.43/12 13} exf4 58. h4 {-19.68/15 43} Rc3+ 59. Qxc3+
{-319.94/100 8} bxc3 60. g3 {-319.95/100 0.1} Qe3+ 61. Kg2
{-319.96/100 0.1} Qxg3+ 62. Kf1 {-319.97/100 0.1} cxb2 63. a3 {-319.98/100}
b1=Q+ 64. Ke2 {-319.99/100} Qbd3#
{Xboard adjudication: Checkmate} 0-1
[/pgn]

Code: Select all

for(p=0; p<10; p++) a[p] = 1;
for(i=0; i<10; i++) a[i] = 1;
[d]RN/nr')); document.write(('Got you!
theme=MV firstRank=1 files=10
Pawn::::a2-j2
Knight:N:::b1,i1
King::KisO3::f1
When quoting, I see that the two FEN strings of the original post are without side to move, castling rights, etc., and both of them are shown in the diagrammes as black to move. Is it a feature? When specifying white to move, it correctly displays the white circle of white to move:

[d]rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

There have been some successful bug hunting/fixing in the meantime, because the chessboard from FEN/diagramme tags of the original post was wrongly displayed to me some hours ago: the 8×8 chessboard and pieces were OK, but there were also four squares i1, j1, k1 and l1 following the dark/light pattern, with i1 and l1 empty squares, a white or black rook at j1 square and a black bishop at k1 square.

Regards from Spain.

Ajedrecista.
User avatar
hgm
Posts: 28315
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Test

Post by hgm »

Yes, the new forum appended a HTML <br> tag to the FEN line, and this was displayed as an extra black Bishop + Rook. :lol:
smatovic
Posts: 3137
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Test

Post by smatovic »

Looks good!

--
Srdja