New engine release - Wukong JS

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: New engine release - Wukong JS

Post by maksimKorzh »

Ferdy wrote: Sat Jan 23, 2021 12:37 pm
maksimKorzh wrote: Fri Jan 22, 2021 3:05 pm Try it;)
https://maksimkorzh.github.io/wukongJS/wukong.html

Also I've added statistics gathering so every time someone plays it I know from which part of the planet and which browser.
Obviously it allows to simply aggregate "views".
Tried it on lowest level.

[Event "Friendly chess game"]
[Site "https://maksimkorzh.github.io/wukongJS/wukong.html"]
[Date "Sat Jan 23 2021 19:26:42 GMT+0800 (Taipei Standard Time)"]
[White "Ferdy"]
[Black "Baihua"]
[Result "0-1 Mate"]

1. e4 e5 2. d4 {3} Nc6 {(b8c6) -0.6/1 0} 3. Bc4 {3} exd4 {(e5d4) -1.62/1 0} 4. Qf3 {2} Nf6 {(g8f6) -1.77/1 0} 5. Bg5 {5} d6 {(d7d6) -1.73/1 0} 6. Qb3 {2} Ne5 {(c6e5) -1.89/1 0} 7. Be2 {6} Qe7 {(d8e7) -2.04/1 0} 8. Nd2 {2} a5 {(a7a5) -1.69/1 0} 9. a4 {2} Rg8 {(h8g8) -1.75/1 0} 10. f4 {1} Ng6 {(e5g6) -1.8/1 0} 11. Nf3 {2} h6 {(h7h6) -1.41/1 0} 12. Bxf6 {3} Qxf6 {(e7f6) -1.67/1 0} 13. 0-0 {3} Qxf4 {(f6f4) -2.12/1 0} 14. e5 {4} dxe5 {(d6e5) -3.24/1 0} 15. Re1 {4} Bc5 {(f8c5) -3.24/1 0} 16. Kh1 {2} e4 {(e5e4) -3.47/1 0} 17. Nxd4 {2} Qxd2 {(f4d2 b3f7) -4.06/1 0} 18. Qxf7+ {5} Kd8 {(e8d8 f7g8) +0.63/1 0} 19. Qxg8+ {2} Ke7 {(d8e7 g8g7) +1.79/1 0} 20. Qxg7+ {58} Kd8 {(e7d8 g7f6) +1.83/1 0} 21. Nb3 {21} Qxc2 {(d2c2 b3c5 c2c5 g7g6) +3.74/1 0} 22. Nxc5 {16} Qxc5 {(c2c5 g7g6) +3.74/1 0} 23. Rd1+ {2} Ke8 {(d8e8 g7g6) +3.78/1 0} 24. Qxg6+ {4} Ke7 {(e8e7 g6e4) +4.77/1 0} 25. Rf7+ {7} Ke8 {(e7e8 f7c7) +4.9/1 0} 26. Qg8+ {5} Qf8 {(c5f8 g8f8) +12.38/1 0} 27. Qxf8+ {1}

Some comments on pgn format.
* White won the game, but result is 0-1
* Date format should be yyyy.mm.dd or 2021.01.23
That would be:
[Date "2021.01.23"]
* Result format should be 0-1 or 1-0 or 1/2-1/2 or *
Not "0-1 Mate"
You can add however.
[Termination "white checkmates black"]
Thanks for reporting bugs, Ferdy
The mate scoring issue comes from the fact Baihua is a 1 ply search - it just can't see mate)
It can mate though (without knowing it)
The other bots see mate so scores are fine there.
Regarding other inaccuracies - I'll fix them.

Awesome feedback, thank you!
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: New engine release - Wukong JS

Post by Guenther »

maksimKorzh wrote: Fri Jan 22, 2021 3:05 pm Try it;)
https://maksimkorzh.github.io/wukongJS/wukong.html

...

Thanks for reporting bugs, Ferdy
The mate scoring issue comes from the fact Baihua is a 1 ply search - it just can't see mate)
It can mate though (without knowing it)
The other bots see mate so scores are fine there.
Regarding other inaccuracies - I'll fix them.

Awesome feedback, thank you!
Another pgn saving bug is that it does not denote ambiguous moves.
I played a single game against the strongest version and after I mated it, I noticed that the pgn contained several
ambiguous moves, which I had to repair first for replaying it in another GUI.
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: New engine release - Wukong JS

Post by maksimKorzh »

Guenther wrote: Sat Jan 23, 2021 2:19 pm
maksimKorzh wrote: Fri Jan 22, 2021 3:05 pm Try it;)
https://maksimkorzh.github.io/wukongJS/wukong.html

...

Thanks for reporting bugs, Ferdy
The mate scoring issue comes from the fact Baihua is a 1 ply search - it just can't see mate)
It can mate though (without knowing it)
The other bots see mate so scores are fine there.
Regarding other inaccuracies - I'll fix them.

Awesome feedback, thank you!
Another pgn saving bug is that it does not denote ambiguous moves.
I played a single game against the strongest version and after I mated it, I noticed that the pgn contained several
ambiguous moves, which I had to repair first for replaying it in another GUI.
Thank you, but can you please share the example PGN?
I was playing as well but didn't notice any issues.
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: New engine release - Wukong JS

Post by Guenther »

maksimKorzh wrote: Sat Jan 23, 2021 11:49 pm
Guenther wrote: Sat Jan 23, 2021 2:19 pm
maksimKorzh wrote: Fri Jan 22, 2021 3:05 pm Try it;)
https://maksimkorzh.github.io/wukongJS/wukong.html

...

Thanks for reporting bugs, Ferdy
The mate scoring issue comes from the fact Baihua is a 1 ply search - it just can't see mate)
It can mate though (without knowing it)
The other bots see mate so scores are fine there.
Regarding other inaccuracies - I'll fix them.

Awesome feedback, thank you!
Another pgn saving bug is that it does not denote ambiguous moves. (at least 8 ambiguous moves)
I played a single game against the strongest version and after I mated it, I noticed that the pgn contained several
ambiguous moves, which I had to repair first for replaying it in another GUI.
Thank you, but can you please share the example PGN?
I was playing as well but didn't notice any issues.
Here is the very early part, which contains already two ambiguous moves.
I had to revert it to the original one, because I had manually repaired already the full pgn.

If you post this into WB example it will stop at move 3.
It is a miracle why it doesn't choke with the browser script here, either
it reads the PV and chnages the move correctly or it simply does some guesswork,
which could fail at any point later.

2...Nc6 and 5. Nd2 are not pgn, because they are ambiguous.
should be 2...Nbc6 and 5. Nbd2 here (in some cases you even need to write the file number for disambiguation instead of rank)

[pgn][Event "Friendly chess game"]
[Site "https://maksimkorzh.github.io/wukongJS/wukong.html"]
[Date "Sat Jan 23 2021 13:28:37 GMT+0100 (Mitteleuropäische Normalzeit)"]
[White "GS"]
[Black "Wukong"]
[Result "1-0"]

1. d4 e6
2. Nf3 {1} Ne7 {(g8e7 b1c3 b8c6 e2e4 d7d5 c1e3 c8d7) -0.2/7 1}
3. g3 {1} Nc6 {(b8c6 b1c3 d7d5 e2e4 c8d7 c1e3 h8g8) -0.44/7 0}
4. Bg2 {1} d5 {(d7d5 b1c3 d8d6 e1g1 c8d7 c1e3) -0.28/6 0}
5. Nd2 {2} Nf5 {(e7f5 e2e3 c8d7 e1g1 d8f6 g3g4 f5d6) -0.53/7 1}
[/pgn]

Ok the browser script just does some guesswork and I can make it easily fail by adding two plies more
(which weren't played but legal ;-)

[pgn][Event "Friendly chess game"]
[Site "https://maksimkorzh.github.io/wukongJS/wukong.html"]
[Date "Sat Jan 23 2021 13:28:37 GMT+0100 (Mitteleuropäische Normalzeit)"]
[White "GS"]
[Black "Wukong"]
[Result "1-0"]

1. d4 e6
2. Nf3 {1} Ne7 {(g8e7 b1c3 b8c6 e2e4 d7d5 c1e3 c8d7) -0.2/7 1}
3. g3 {1} Nc6 {(b8c6 b1c3 d7d5 e2e4 c8d7 c1e3 h8g8) -0.44/7 0}
4. Bg2 {1} d5 {(d7d5 b1c3 d8d6 e1g1 c8d7 c1e3) -0.28/6 0}
5. Nd2 {2} Nf5 {(e7f5 e2e3 c8d7 e1g1 d8f6 g3g4 f5d6) -0.53/7 1}
6. Nc3 Be7[/pgn]
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: New engine release - Wukong JS

Post by maksimKorzh »

Guenther wrote: Sun Jan 24, 2021 8:34 am
maksimKorzh wrote: Sat Jan 23, 2021 11:49 pm
Guenther wrote: Sat Jan 23, 2021 2:19 pm
maksimKorzh wrote: Fri Jan 22, 2021 3:05 pm Try it;)
https://maksimkorzh.github.io/wukongJS/wukong.html

...

Thanks for reporting bugs, Ferdy
The mate scoring issue comes from the fact Baihua is a 1 ply search - it just can't see mate)
It can mate though (without knowing it)
The other bots see mate so scores are fine there.
Regarding other inaccuracies - I'll fix them.

Awesome feedback, thank you!
Another pgn saving bug is that it does not denote ambiguous moves. (at least 8 ambiguous moves)
I played a single game against the strongest version and after I mated it, I noticed that the pgn contained several
ambiguous moves, which I had to repair first for replaying it in another GUI.
Thank you, but can you please share the example PGN?
I was playing as well but didn't notice any issues.
Here is the very early part, which contains already two ambiguous moves.
I had to revert it to the original one, because I had manually repaired already the full pgn.

If you post this into WB example it will stop at move 3.
It is a miracle why it doesn't choke with the browser script here, either
it reads the PV and chnages the move correctly or it simply does some guesswork,
which could fail at any point later.

2...Nc6 and 5. Nd2 are not pgn, because they are ambiguous.
should be 2...Nbc6 and 5. Nbd2 here (in some cases you even need to write the file number for disambiguation instead of rank)

[pgn][Event "Friendly chess game"]
[Site "https://maksimkorzh.github.io/wukongJS/wukong.html"]
[Date "Sat Jan 23 2021 13:28:37 GMT+0100 (Mitteleuropäische Normalzeit)"]
[White "GS"]
[Black "Wukong"]
[Result "1-0"]

1. d4 e6
2. Nf3 {1} Ne7 {(g8e7 b1c3 b8c6 e2e4 d7d5 c1e3 c8d7) -0.2/7 1}
3. g3 {1} Nc6 {(b8c6 b1c3 d7d5 e2e4 c8d7 c1e3 h8g8) -0.44/7 0}
4. Bg2 {1} d5 {(d7d5 b1c3 d8d6 e1g1 c8d7 c1e3) -0.28/6 0}
5. Nd2 {2} Nf5 {(e7f5 e2e3 c8d7 e1g1 d8f6 g3g4 f5d6) -0.53/7 1}
[/pgn]

Ok the browser script just does some guesswork and I can make it easily fail by adding two plies more
(which weren't played but legal ;-)

[pgn][Event "Friendly chess game"]
[Site "https://maksimkorzh.github.io/wukongJS/wukong.html"]
[Date "Sat Jan 23 2021 13:28:37 GMT+0100 (Mitteleuropäische Normalzeit)"]
[White "GS"]
[Black "Wukong"]
[Result "1-0"]

1. d4 e6
2. Nf3 {1} Ne7 {(g8e7 b1c3 b8c6 e2e4 d7d5 c1e3 c8d7) -0.2/7 1}
3. g3 {1} Nc6 {(b8c6 b1c3 d7d5 e2e4 c8d7 c1e3 h8g8) -0.44/7 0}
4. Bg2 {1} d5 {(d7d5 b1c3 d8d6 e1g1 c8d7 c1e3) -0.28/6 0}
5. Nd2 {2} Nf5 {(e7f5 e2e3 c8d7 e1g1 d8f6 g3g4 f5d6) -0.53/7 1}
6. Nc3 Be7[/pgn]
Oh, now I see the issue. Yeah that just wasn't implemented yet - it's my first time implementing PGN and SAN. Need to think how to find those moves.

Did you try UCI mode?
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: New engine release - Wukong JS

Post by Guenther »

maksimKorzh wrote: Sun Jan 24, 2021 9:16 am
Guenther wrote: Sun Jan 24, 2021 8:34 am ...

2...Nc6 and 5. Nd2 are not pgn, because they are ambiguous.
should be 2...Nbc6 and 5. Nbd2 here (in some cases you even need to write the file number for disambiguation instead of rank)

...
Oh, now I see the issue. Yeah that just wasn't implemented yet - it's my first time implementing PGN and SAN. Need to think how to find those moves.

Did you try UCI mode?
What do you mean by uci mode? If you follow the thread we are currently talking about testing it in a browser from your website.

If you mean, if I had played it in another GUI as Human - no not yet.
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: New engine release - Wukong JS

Post by maksimKorzh »

Guenther wrote: Sun Jan 24, 2021 9:36 am
maksimKorzh wrote: Sun Jan 24, 2021 9:16 am
Guenther wrote: Sun Jan 24, 2021 8:34 am ...

2...Nc6 and 5. Nd2 are not pgn, because they are ambiguous.
should be 2...Nbc6 and 5. Nbd2 here (in some cases you even need to write the file number for disambiguation instead of rank)

...
Oh, now I see the issue. Yeah that just wasn't implemented yet - it's my first time implementing PGN and SAN. Need to think how to find those moves.

Did you try UCI mode?
What do you mean by uci mode? If you follow the thread we are currently talking about testing it in a browser from your website.

If you mean, if I had played it in another GUI as Human - no not yet.
I simply mean that it's possible for it to play versus other engines via UCI protocol
That it done via running WukongJS in UCI mode using nodejs
https://github.com/maksimKorzh/wukongJS ... ocs/UCI.MD

In browser the strongest version spends less than a second per move.
In GUIs whatever time control can be set and it's obviously stronger there.
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: New engine release - Wukong JS

Post by Guenther »

maksimKorzh wrote: Sun Jan 24, 2021 11:23 am
Guenther wrote: Sun Jan 24, 2021 9:36 am
maksimKorzh wrote: Sun Jan 24, 2021 9:16 am
Guenther wrote: Sun Jan 24, 2021 8:34 am ...

2...Nc6 and 5. Nd2 are not pgn, because they are ambiguous.
should be 2...Nbc6 and 5. Nbd2 here (in some cases you even need to write the file number for disambiguation instead of rank)

...
Oh, now I see the issue. Yeah that just wasn't implemented yet - it's my first time implementing PGN and SAN. Need to think how to find those moves.

Did you try UCI mode?
What do you mean by uci mode? If you follow the thread we are currently talking about testing it in a browser from your website.

If you mean, if I had played it in another GUI as Human - no not yet.
I simply mean that it's possible for it to play versus other engines via UCI protocol
That it done via running WukongJS in UCI mode using nodejs
https://github.com/maksimKorzh/wukongJS ... ocs/UCI.MD
I know this of course, I thought you wanted your webapp being tested too...at that point I joined the thread.

Using it in a GUI was done long ago already and revealed problems, which were fixed later.
I also discovered that you cannot run newer Node versions on WIn7 at all, while too old Node versions won't work at all with it, etc...
http://talkchess.com/forum3/viewtopic.php?f=2&t=76140
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: New engine release - Wukong JS

Post by maksimKorzh »

Guenther wrote: Sun Jan 24, 2021 1:01 pm
maksimKorzh wrote: Sun Jan 24, 2021 11:23 am
Guenther wrote: Sun Jan 24, 2021 9:36 am
maksimKorzh wrote: Sun Jan 24, 2021 9:16 am
Guenther wrote: Sun Jan 24, 2021 8:34 am ...

2...Nc6 and 5. Nd2 are not pgn, because they are ambiguous.
should be 2...Nbc6 and 5. Nbd2 here (in some cases you even need to write the file number for disambiguation instead of rank)

...
Oh, now I see the issue. Yeah that just wasn't implemented yet - it's my first time implementing PGN and SAN. Need to think how to find those moves.

Did you try UCI mode?
What do you mean by uci mode? If you follow the thread we are currently talking about testing it in a browser from your website.

If you mean, if I had played it in another GUI as Human - no not yet.
I simply mean that it's possible for it to play versus other engines via UCI protocol
That it done via running WukongJS in UCI mode using nodejs
https://github.com/maksimKorzh/wukongJS ... ocs/UCI.MD
I know this of course, I thought you wanted your webapp being tested too...at that point I joined the thread.

Using it in a GUI was done long ago already and revealed problems, which were fixed later.
I also discovered that you cannot run newer Node versions on WIn7 at all, while too old Node versions won't work at all with it, etc...
http://talkchess.com/forum3/viewtopic.php?f=2&t=76140
I deeply appreciate your web interface tests.
Cool that you've tested UCI version as well.
Picking up certain programming language is always a trade off.
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: New engine release - Wukong JS

Post by maksimKorzh »

PGN has now moved from SAN to UCI (1. e2e4 e7e5 2. g1f3) format to avoid piece ambiguity.
I think it's a better and most straightforward solution.
It works in both Arena and Winboard.