Page 3 of 6

Re: New engine release - Wukong JS

Posted: Sun Jan 10, 2021 11:14 pm
by maksimKorzh
Hi guys, I have a few important updates on Wukong JS development progress to share.
For some reason I forgot to annouce version 1.3 release, probably because it was mostly
about fixing bugs)

So Wukong JS 1.4 is about to be released pretty soon - I'm running some final tests now.
Now version 1.4a is available for testing, so here're the main updates:
1. Transposition table with variable hash size (now it searches 8-9 plies in blitz 2+1)
2. Very basic implementation of Texel's tuning + video + "paper" explaining the pipeline
3. Own unique material/PST values instead using rofChade's obtained via Texel's tuning (probably worse than Ronald's but at least my own)
4. Easily extensible opening book in browser mode

LINKS
Wukong JS 1.4a(just clone the code, download link in readme still points to v1.3): https://github.com/maksimKorzh/wukongJS
Texel's tuning: https://github.com/maksimKorzh/wukongJS ... _TUNING.MD
Play online: https://maksimkorzh.github.io/wukongJS/wukong.html

VIDEOS
Texel's tuning theory:
Texel's tuning results:

Re: New engine release - Wukong JS

Posted: Fri Jan 15, 2021 3:18 am
by maksimKorzh
WukongJS v1.4 - RELEASE -
https://github.com/maksimKorzh/wukongJS

What's new:
- engine agnostic implementation of Texel's tuning in python to tune material weights + PST only
- added hash table (very basic, always replace schema)
- added a tiny opening book mostly with my favorite unorthodox opening (it's a javascript array, so user can easily extend it with new lines, browser mode feature only)
- stopped using rofChade's material weigths/PST and tuned my own uslng the most primitive implementation of Texel's tuning and gm2600.pgn
- rewritten timing

Dropping Ronald's PSTs costed WukongJS aroung -100Elo points, but hash table and fixing a couple of bugs in search gained those 100 Elo back and even slightly more. At the moment WukongJS is around of strength of TSCP in blitz 1723, maybe slightly stronger.

Here's the latest 100 games match versus TSCP 2m + 1s arena perfect_2010.abk 12 plies

Code: Select all

-----------------TSCP-----------------
TSCP - WukongJS 1.4 : 47,5/100 40-45-15 (00110=1100011=00=110010101011100==1011==001=0001=01=10100111=1110=001100011001010==010100110=0011000)  48%   -14
-----------------WukongJS 1.4-----------------
WukongJS 1.4 - TSCP : 52,5/100 45-40-15 (11001=0011100=11=001101010100011==0100==110=1110=10=01011000=0001=110011100110101==101011001=1100111)  53%   +21
Here're games: https://raw.githubusercontent.com/maksi ... ataset.pgn

CCRL TESTING REQUEST:
I asked Gabor to test WukongJS but he's a bit busy now, so I would appreciate if some one from CCRL group would kindly include
it into tests,

WukongJS is a javascript chess engine with UCI interface, details on installation to Arena GUI:
https://github.com/maksimKorzh/wukongJS ... ocs/UCI.MD

Version 1.4 direct download link:
https://github.com/maksimKorzh/wukongJS ... S_v1.4.zip

Re: New engine release - Wukong JS

Posted: Sat Jan 16, 2021 1:17 am
by Sergio Martinez
I have just started a gauntlet.

Best regards

Re: New engine release - Wukong JS

Posted: Sat Jan 16, 2021 11:11 am
by maksimKorzh
Sergio Martinez wrote: Sat Jan 16, 2021 1:17 am I have just started a gauntlet.

Best regards
Oh, that is such a good news!
Thank you so much, Sergio!

Re: New engine release - Wukong JS

Posted: Mon Jan 18, 2021 6:08 pm
by maksimKorzh
Hey what's up guys, I have a new incredible update on WukongJS development progress.
Sometimes it appears to be extremely beneficial to expose your work on youtube and this is why)
So one of my subscribers, his name is Gontran Lemaire has followed my tutorials on and implemented
his own move generator based on mixed ideas from my WukongJS and BMCP (bare minimal chess program - based on microMax's movegen by HGM)
And he has created around 10!!! time faster movegen believe it or not!
The main issue with WukongJS was using object lookup. Objects appeared to be slow as hell in javasript.
Gontran used piece codes based on ideas from BMCP and got rid of object lookup completely.
This has resulted such a horrific performance improvement.

After that I've patched WukongJS with the ideas by Gontran by simply mapping "optimized" piece codes
to my native ones (I just didn't want to rewrite the entire engine because of different piece code). Eventually
I've made WukongJS around 6x faster than before.

Watch "detective story" on this topic:




After finishing optimization I've played 100 games new vs old version and results are impressive:

Code: Select all

-----------------WukongJS 1.4-----------------
WukongJS 1.4 - WukongJS 1.5a : 25,5/100 12-61-27 (=0000=0===110001001000000000===00000==01=11000=0==010==100=00===000000000==0=01000010=0=1000000=000=)  26%  -182
-----------------WukongJS 1.5a-----------------
WukongJS 1.5a - WukongJS 1.4 : 74,5/100 61-12-27 (=1111=1===001110110111111111===11111==10=00111=1==101==011=11===111111111==1=10111101=1=0111111=111=)  75%  +191

Tournament is here: https://github.com/maksimKorzh/wukongJS ... ongJS_v1.4

Life is full of surprises!

Re: New engine release - Wukong JS

Posted: Mon Jan 18, 2021 8:15 pm
by Dann Corbit
Did you hear about this js to native binaries compiler:
https://github.com/NectarJS/nectarjs

I think this one is free:
https://github.com/nexe/nexe

This is old, so I do not know if it still works:
https://www.phpied.com/make-your-javasc ... ndows-exe/

This thing looks interesting too:
https://www.abyssmedia.com/scriptcrypto ... ript.shtml

Re: New engine release - Wukong JS

Posted: Mon Jan 18, 2021 8:53 pm
by maksimKorzh
Dann Corbit wrote: Mon Jan 18, 2021 8:15 pm Did you hear about this js to native binaries compiler:
https://github.com/NectarJS/nectarjs

I think this one is free:
https://github.com/nexe/nexe

This is old, so I do not know if it still works:
https://www.phpied.com/make-your-javasc ... ndows-exe/

This thing looks interesting too:
https://www.abyssmedia.com/scriptcrypto ... ript.shtml
I'm aware of that but my goal is to provide EXACT playing strength in both browser and UCI mode.
I'm looking only for relative improvements based on code and not on the environment.
It's just better to write in C for the best performance - I did that already.
Writing in JS brings more fun because on the one hand people can instantly try engine out in the browser
and on the other hand if they like it they can easily run it in UCI mode - exact engine, exact strength.
I'm not competing with others I only fight my own dumbness and bugs of previous versions)))

Re: New engine release - Wukong JS

Posted: Mon Jan 18, 2021 9:43 pm
by Dann Corbit
I looked over the JS language (I have done some Java programming) and I am astonished to learn that it is not even typed.
Writing a chess engine in javascript is like writing one in perl or python.
You're a braver man than I am Gunga Dinn.

Re: New engine release - Wukong JS

Posted: Mon Jan 18, 2021 10:23 pm
by maksimKorzh
Dann Corbit wrote: Mon Jan 18, 2021 9:43 pm I looked over the JS language (I have done some Java programming) and I am astonished to learn that it is not even typed.
Writing a chess engine in javascript is like writing one in perl or python.
You're a braver man than I am Gunga Dinn.
JS simply allows to deliver your work to more people. Nothing brave there.

Lozza and tomitank are also written in JS but much stronger (2500+/2900+)

Who is Gunga Dinn???

Re: New engine release - Wukong JS

Posted: Mon Jan 18, 2021 10:29 pm
by Dann Corbit
Gunga Din is a guy in a poem by Rudyard Kipling and at the end of the poem the author admits that Gunga Din is a better man than he is.
His name is the source of a famous joke:
Gentleman to lady: "Do you like Kipling?"
Lady to gentleman: "I don't know. I've never kippled."

I did run your program by typing the name of the html file. It works fine.