benckx / elephantchess.io

Play and study Chinese chess online
https://elephantchess.io
4 stars 0 forks source link

Import WXF and UCI to Analysis Board #71

Closed benckx closed 1 year ago

davide2024 commented 1 year ago

I tried to send a file here, but it says it doesn't support this type of file.

davide2024 commented 1 year ago

the copy and paste doesn't work, it works if I zip the file. these are egf files saved with XieXieMaster (an engine and GUI created by a Vietnamese-French programmer) egf_files.zip

davide2024 commented 1 year ago

wxf_example.zip these are games saved in wxf, don't know if all programs save in the same way.

benckx commented 1 year ago

I have no idea how to read the EGF files but the WXF are straightforward enough. You also had some examples of UCI text files? I could generate some, but if you have one that come from other programs, that could be a better test case.

davide2024 commented 1 year ago

Could you tell me if these are examples of UCI text files? I believe they are.

On Sunday, August 27, 2023 at 01:49:25 PM EDT, benckx ***@***.***> wrote:  

I have no idea how to read the EGF files but the WXF are straightforward enough. You also had some examples of UCI text files? I could generate some, but if you have one that come from other programs, that could be a better test case.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

davide2024 commented 1 year ago

This is the page with the contact for the XieXieMaster programmer who has created the egf files. XiangQi - XieXie

|

XiangQi - XieXie

The Home of Xiang Qi XieXie |

|

|

On Sunday, August 27, 2023 at 01:49:25 PM EDT, benckx ***@***.***> wrote:  

I have no idea how to read the EGF files but the WXF are straightforward enough. You also had some examples of UCI text files? I could generate some, but if you have one that come from other programs, that could be a better test case.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

benckx commented 1 year ago

Do you mean the EGF? I don't understand what they are when I open them as text file.

Right now you can only copy-paste text in the UI.

benckx commented 1 year ago

@davide2024 I'm deploying a version now which works on both types of format:

PGN-0:

[Event "Computer Chess Game"]
[Site "DAVIDE"]
[Date "2023.02.08"]
[Round "-"]
[White "Cyclone v6.2 [develop 091218] (UCI2WB)"]
[Black "ElephantEye 3.1 (UCCI2WB)"]
[Result "*"]
[TimeControl "600+20"]
[Variant "xiangqi"]
[Annotator "1. +0.38   4... -0.20"]

1. Cbe2 {+0.38/19} Hg7 2. Hc2 {+0.30/18 41} Cd7 3. c4 {+0.75/18 40} g5 4.
Rb0 {+0.64/18 39} Ege7 {-0.20/11 22} 5. Chf2 {+0.61/18 1:36} Afe8
{-0.14/11 8} 6. Hi2 {+0.56/18 28} Rf9 7. Afe1 {+0.75/18 35} Cd5
{-0.11/12 24} 8. Rb8 {+0.65/18 35} Ch8 {-0.13/12 19} 9. Rb7 Ha7
{-0.14/12 21} 10. Hb4 Ch3 11. e4 {+0.65/16 42} Cd1 {-0.10/11 30} 12. Rh0
{+0.98/16 34} Cxa3 13. e5 {+0.85/16 32} exe5 {-0.09/11 17} 14. Rh7
{+0.60/15 45} Ce3 {-0.14/11 15} 15. Kf0 {+0.82/16 15} Cd7 {-0.15/11 18} 16.
Cxe5 {+1.31/15 21} Rf5 17. Rxd7 {+1.85/14 32} Rxe5 18. Rd4 {+2.39/17 1:37}
Cf3+ 19. Cb2 {+2.73/15 21} Hf9 {-0.14/11 15} 20. Rf4 {+2.51/17 7} Ce3
{-0.29/11 7} 21. Cf2 {+4.78/14 19} Rb9 {-0.69/12 40} 22. Cxf9 Rbb5
{-0.99/11 23} 23. Rf8 {+8.30/14 1.9} g4 {-1.98/12 41} 24. gxg4 Rh5
{-1.47/12 11} 25. Rxh5 {+8.91/15 18} Rxh5 26. Ci9 {+9.10/16 30} Ad7 27. Hc2
{+8.75/15 37} Cc3 {-1.45/11 14} 28. He3 {+9.42/14 27} Cd3 {-1.54/12 28} 29.
i4 {+9.43/15 35} a5 {-1.49/12 24} 30. Hf5 Rh7 {-1.58/12 18} 31. g5 Exg5
{-1.63/12 47} 32. Rg8 {+10.50/16 1:00} Rf7 {-1.60/12 8} 33. Rxg5
{+10.61/16 23} Ee7 34. Rg9+ {+10.81/15 29} Ke8 35. Rg8+ {+10.87/15 26} Ke9
36. Hh4 {+11.03/16 40} a4 37. Ke0 {+11.76/14 17} Rf6 {-1.81/11 12} 38. Rg9+
{+12.60/13 9} Ke8 {-1.86/13 9} 39. Rg3 Ca3 40. Rg8+ {+13.97/14 28} Ke9 41.
He3 {+14.34/15 26} Rf7 {-2.09/12 23} 42. Hg6 {+15.25/13 27} i5
{-2.54/11 11} 43. ixi5 {+16.97/13 15} ab4 {-3.12/12 40} 44. Hd5 Hc8
{-3.10/11 19} 45. Rxc8 Eg5 {-3.34/11 28} 46. Rh8 {+21.52/13 21} Ca8
{-4.27/12 26} 47. ih5 Ce8+ {-4.25/12 1:01} 48. Ece2 {+24.04/16 29} Cd8
{-4.54/13 31} 49. Hxb4 {+24.76/13 17} Rg7 {-4.40/14 30} 50. Rh9+ Ke8
{-3.99/10 2.5} 51. hxg5 {+25.74/15 26} Cb8 52. Hxc6 {+26.38/14 28} Cb0+
{-5.15/12 33} 53. Ec0 {+24.35/7 0.2} Cb9 {-5.13/12 28} 54. Rh8+
{+1000.16/13 27} Ke9 55. Hce7 {+1000.15/11 0.1} Cb7 {-5.91/12 1:02} 56.
Hg8+ {+1000.12/11 1.8} Ke8 57. Ci8 {+1000.11/9 0.1} Kd8 58. H8e7+ A9e8
{-5.01/3 0.2} 59. Rh9+ Af9 {-99.84/9 0.2} 60. Hxf9+ Ke8 {-5.81/2 0.2} 61.
Hxg7+ Cxg7 {-5.07/2 0.2} 62. Rd9 {+1000.06/5 0.2} Cxg5 {-99.90/6 0.2} 63.
Hh8+ Cg8 {-5.44/2 0.2} 64. Cxg8 {+1000.03/5 0.2} Kf8 65. Hg6+
{+1000.02/5 0.1} Ke8 66. c5
*

PGN-1:

[Event "PyChess casual game"]
[Site "https://www.pychess.org/cLQefhp2"]
[Date "2023.03.04"]
[Round "-"]
[White "Fairy-Stockfish"]
[Black "davide2022"]
[Result "1-0"]
[TimeControl "900+20"]
[WhiteElo "1500?"]
[BlackElo "1500?"]
[Variant "Xiangqi"]
[FEN "rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR w - - 0 1"]
[SetUp "1"]

1. Che3 Hg8 2. Hg3 Rh10 3. Rh1 Hc8 4. Pc5 Pg6 5. Rh7 Ade9 6. Cbc3 Hf6 7. Pc6 Ece8 8. Pxc7 Hb10 9. Ha3 Pg5 10. Rh6 Hd5 11. He2 Pxg4 12. Rb1 Ca8 13. Pd7 Hc8 14. Rb5 Hxe3 15. Egxe3 Rh9 16. Rc5 Hd10 17. Pxe7 Rb10 18. Hc4 Rb4 19. He5 Rxe4 20. Ca3 Cc8 21. Cxa7 Rxa4 22. Hd7 Cd8 23. Ca5 Hb9 24. Hc3 Rb4 25. Ca10 Rb7 26. Hb5 Ch7 27. Ade2 Rh8 28. Rc10+ Hd10 29. Hd6 Ra7 30. Pxe8 Exe8 31. Hf7 Rg8 32. Hxd8+ Axd8 33. Rb10 Ch8 34. Cxd10 Afe9 35. Cd9+ Ad10 36. Rh7 Ra6 37. Ci9 Ra9 38. Ci8 Ch9 39. Ci9 Ch8 40. Ci8 Ch9 41. Ci9 Ch8 1-0

I might tackle WXF next weekend.

davide2024 commented 1 year ago

Tried this and gave error sent you image on whasapp

  1. b2e2 b9c7 2. b0c2 a9b9 3. a0b0 c6c5 4. b0b6 h9g7 5. h0g2 g6g5 6. g3g4 g5g4 7. i0i1 g4g3 8. e3e4 g3g2 9. h2i2 g2f2 10. e2e3 b7b8 11. i1g1 b8g8 12. b6b9 g8g1 13. b9b4 h7h0 14. e4e5 f2f1 15. b4h4 f1f0 16. e0e1 i9h9 17. h4h9 g7h9 18. e1f1 h9g7 19. e3e6 g7h5 20. i2e2 h5g3 21. f1f2 g1i1 22. e5f5 g3e2 23. f2e2 c7d5 24. e2f2 d5c3 25. f5e5 i1b1 26. g0i2 f0g0 27. c2e3 b1b5 28. i2g0 h0d0 29. f2f1 b5e5 30. e3g4 e5e4 31. g4f6 d0d8 32. e6e5 c5c4 33. i3i4 e4e3 34. f6d7 c4d4 35. a3a4 d4e4 36. d7f6 e3e5 37. f6d7 e5e7 38. c0a2 e4f4 39. i4i5 e7f7 40. d7f6 d8f8 41. a4a5 f8f6

    On Monday, August 28, 2023 at 11:51:04 AM EDT, benckx @.***> wrote:

@davide2024 I'm deploying a version now which works on both types of format:

PGN-0: [Event "Computer Chess Game"] [Site "DAVIDE"] [Date "2023.02.08"] [Round "-"] [White "Cyclone v6.2 [develop 091218] (UCI2WB)"] [Black "ElephantEye 3.1 (UCCI2WB)"] [Result "*"] [TimeControl "600+20"] [Variant "xiangqi"] [Annotator "1. +0.38 4... -0.20"]

  1. Cbe2 {+0.38/19} Hg7 2. Hc2 {+0.30/18 41} Cd7 3. c4 {+0.75/18 40} g5 4. Rb0 {+0.64/18 39} Ege7 {-0.20/11 22} 5. Chf2 {+0.61/18 1:36} Afe8 {-0.14/11 8} 6. Hi2 {+0.56/18 28} Rf9 7. Afe1 {+0.75/18 35} Cd5 {-0.11/12 24} 8. Rb8 {+0.65/18 35} Ch8 {-0.13/12 19} 9. Rb7 Ha7 {-0.14/12 21} 10. Hb4 Ch3 11. e4 {+0.65/16 42} Cd1 {-0.10/11 30} 12. Rh0 {+0.98/16 34} Cxa3 13. e5 {+0.85/16 32} exe5 {-0.09/11 17} 14. Rh7 {+0.60/15 45} Ce3 {-0.14/11 15} 15. Kf0 {+0.82/16 15} Cd7 {-0.15/11 18} 16. Cxe5 {+1.31/15 21} Rf5 17. Rxd7 {+1.85/14 32} Rxe5 18. Rd4 {+2.39/17 1:37} Cf3+ 19. Cb2 {+2.73/15 21} Hf9 {-0.14/11 15} 20. Rf4 {+2.51/17 7} Ce3 {-0.29/11 7} 21. Cf2 {+4.78/14 19} Rb9 {-0.69/12 40} 22. Cxf9 Rbb5 {-0.99/11 23} 23. Rf8 {+8.30/14 1.9} g4 {-1.98/12 41} 24. gxg4 Rh5 {-1.47/12 11} 25. Rxh5 {+8.91/15 18} Rxh5 26. Ci9 {+9.10/16 30} Ad7 27. Hc2 {+8.75/15 37} Cc3 {-1.45/11 14} 28. He3 {+9.42/14 27} Cd3 {-1.54/12 28} 29. i4 {+9.43/15 35} a5 {-1.49/12 24} 30. Hf5 Rh7 {-1.58/12 18} 31. g5 Exg5 {-1.63/12 47} 32. Rg8 {+10.50/16 1:00} Rf7 {-1.60/12 8} 33. Rxg5 {+10.61/16 23} Ee7 34. Rg9+ {+10.81/15 29} Ke8 35. Rg8+ {+10.87/15 26} Ke9
  2. Hh4 {+11.03/16 40} a4 37. Ke0 {+11.76/14 17} Rf6 {-1.81/11 12} 38. Rg9+ {+12.60/13 9} Ke8 {-1.86/13 9} 39. Rg3 Ca3 40. Rg8+ {+13.97/14 28} Ke9 41. He3 {+14.34/15 26} Rf7 {-2.09/12 23} 42. Hg6 {+15.25/13 27} i5 {-2.54/11 11} 43. ixi5 {+16.97/13 15} ab4 {-3.12/12 40} 44. Hd5 Hc8 {-3.10/11 19} 45. Rxc8 Eg5 {-3.34/11 28} 46. Rh8 {+21.52/13 21} Ca8 {-4.27/12 26} 47. ih5 Ce8+ {-4.25/12 1:01} 48. Ece2 {+24.04/16 29} Cd8 {-4.54/13 31} 49. Hxb4 {+24.76/13 17} Rg7 {-4.40/14 30} 50. Rh9+ Ke8 {-3.99/10 2.5} 51. hxg5 {+25.74/15 26} Cb8 52. Hxc6 {+26.38/14 28} Cb0+ {-5.15/12 33} 53. Ec0 {+24.35/7 0.2} Cb9 {-5.13/12 28} 54. Rh8+ {+1000.16/13 27} Ke9 55. Hce7 {+1000.15/11 0.1} Cb7 {-5.91/12 1:02} 56. Hg8+ {+1000.12/11 1.8} Ke8 57. Ci8 {+1000.11/9 0.1} Kd8 58. H8e7+ A9e8 {-5.01/3 0.2} 59. Rh9+ Af9 {-99.84/9 0.2} 60. Hxf9+ Ke8 {-5.81/2 0.2} 61. Hxg7+ Cxg7 {-5.07/2 0.2} 62. Rd9 {+1000.06/5 0.2} Cxg5 {-99.90/6 0.2} 63. Hh8+ Cg8 {-5.44/2 0.2} 64. Cxg8 {+1000.03/5 0.2} Kf8 65. Hg6+ {+1000.02/5 0.1} Ke8 66. c5 *

PGN-1: [Event "PyChess casual game"] [Site "https://www.pychess.org/cLQefhp2"] [Date "2023.03.04"] [Round "-"] [White "Fairy-Stockfish"] [Black "davide2022"] [Result "1-0"] [TimeControl "900+20"] [WhiteElo "1500?"] [BlackElo "1500?"] [Variant "Xiangqi"] [FEN "rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR w - - 0 1"] [SetUp "1"]

  1. Che3 Hg8 2. Hg3 Rh10 3. Rh1 Hc8 4. Pc5 Pg6 5. Rh7 Ade9 6. Cbc3 Hf6 7. Pc6 Ece8 8. Pxc7 Hb10 9. Ha3 Pg5 10. Rh6 Hd5 11. He2 Pxg4 12. Rb1 Ca8 13. Pd7 Hc8 14. Rb5 Hxe3 15. Egxe3 Rh9 16. Rc5 Hd10 17. Pxe7 Rb10 18. Hc4 Rb4 19. He5 Rxe4 20. Ca3 Cc8 21. Cxa7 Rxa4 22. Hd7 Cd8 23. Ca5 Hb9 24. Hc3 Rb4 25. Ca10 Rb7 26. Hb5 Ch7 27. Ade2 Rh8 28. Rc10+ Hd10 29. Hd6 Ra7 30. Pxe8 Exe8 31. Hf7 Rg8 32. Hxd8+ Axd8 33. Rb10 Ch8 34. Cxd10 Afe9 35. Cd9+ Ad10 36. Rh7 Ra6 37. Ci9 Ra9 38. Ci8 Ch9 39. Ci9 Ch8 40. Ci8 Ch9 41. Ci9 Ch8 1-0

I might tackle WXF next weekend.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

benckx commented 1 year ago

Yes this is UCI, not PGN.

benckx commented 1 year ago

@davide2024 If you find new cases that don't work, feel free to copy paste them here or open a new ticket.

davide2024 commented 1 year ago
1

C2=5

n2+3

2

N2+3

c8=6

3

A6+5

r1+1

4

N8+7

r1=4

5

P5+1

a6+5

6

P5+1

p5+1

7

N7+5

n3+5

8

C5+3

c6=5

9

C8=5

c5+2

10

C5+3

c2=5

11

C5+2

b7+5

12

R1=2

n8+7

13

R9=8

p7+1

14

R2+6

r4+5

15

P3+1

p7+1

16

N5+3

r4=7

17

-N+5

r7+3

18

N3+4

r9=6

19

N4+3

r6+1

20

N3-1

n7+6

21

R2+3

r6-1

22

R2=4

k5=6

23

N5+4

r7-5

24

R8+5

n5+6

25

N1+2

k6=5

26

N2-3

p3+1

27

R8+1

r7+3

28

R8=1

a5-6

29

R1=6

r7=3

30

K5=6

r3+2

31

K6+1

a4+5

32

N4+2

r3-1

33

K6-1

a5+4

34

N2+3

k5=4

35

R6+1