PS: the onmessage() function in here http://op12no2.me/toys/lozzadev/lozza.js does all the UCI input stuff. feel free to use it. It's not elegant but get's the job done. It updates a global object uci.spec that is then used by the native code. Regular expressions would be more elegant by they turn my brain to mush...gladius wrote: I will get UCI support added to garbochess.js one of these days and we can have a js engine tournament .
Stockfish in Lozza UIs
Moderators: hgm, Rebel, chrisw
-
- Posts: 490
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Stockfish in Lozza UIs
-
- Posts: 490
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Stockfish in Lozza UIs
Gary,
It was quiet in work this afternoon so I did the necessary tweaks to your original Javascript GarboChess engine to make it UCI compliant.
source: http://op12no2.me/posts/1964
I've added it to the Lozza engines:-
play | analyse | console
As well as working online it now works in UIs like Arena and the command line using node.js or jsUCI as the host exe.
Another alternative is to compile V8 and tweak their shell example to create your own stand alone exe. I am trying to do this but totally failing to follow the destructions to build V8. Edmund?
Note also the link to jxCore in the above post which makes it easy to create executables.
Please do feel free to send me any new versions; it'd be great to to keep the Lozza site up to date.
If anybody else is interested in developing a Javascript (not Java) engine, I made some notes here.
PS: the time control stuff I added is very primitive...
It was quiet in work this afternoon so I did the necessary tweaks to your original Javascript GarboChess engine to make it UCI compliant.
source: http://op12no2.me/posts/1964
I've added it to the Lozza engines:-
play | analyse | console
As well as working online it now works in UIs like Arena and the command line using node.js or jsUCI as the host exe.
Another alternative is to compile V8 and tweak their shell example to create your own stand alone exe. I am trying to do this but totally failing to follow the destructions to build V8. Edmund?
Note also the link to jxCore in the above post which makes it easy to create executables.
Please do feel free to send me any new versions; it'd be great to to keep the Lozza site up to date.
If anybody else is interested in developing a Javascript (not Java) engine, I made some notes here.
PS: the time control stuff I added is very primitive...
-
- Posts: 490
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Stockfish in Lozza UIs
PPS: I'm not totally convinced I'm initialising the right stuff on a POSITION message.
-
- Posts: 568
- Joined: Tue Dec 12, 2006 10:10 am
- Full name: Gary Linscott
Re: Stockfish in Lozza UIs
Awesome!! Thanks so much .op12no2 wrote:Gary,
It was quiet in work this afternoon so I did the necessary tweaks to your original Javascript GarboChess engine to make it UCI compliant.
Is there a way to do engine-engine play in your UI?
Really nice web UI too btw .
-
- Posts: 490
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Stockfish in Lozza UIs
Not yet. I want to add time controls to the play UI then add a match capability. For now you can do it offline in Arena or Winboard etc using jsUCI or node. When I tried GarboChess in Arena (using node) it was displaying some pretty wild centipawn values - I may not be sending back the right variable and/or not initialising correctly on UCINEWGAME and/or POSITION.gladius wrote:
Awesome!! Thanks so much .
Is there a way to do engine-engine play in your UI?
Really nice web UI too btw .
It would be really interesting if you could develop your JS version to be equal in strength to the C# version (I think) that is on CCRL.
I can't help feeling that JIT compiling and optimising in real-time a la V8 is in fact a good thing for chess engines since "hot" funcs are targetted. V8 often deoptimises though and the trick is finding out why and stopping it. You can fire up GarboChess in node and watch V8 optimising and deoptimising using:-
Code: Select all
node --trace-opt --trace-deopt --code-comments --allow-natives-syntax garbo.js
--allow-natives-syntax is a really interesting option that allows you to control V8 using a special syntax, e.g. I tell it to never optimise my TT initialisation function like this:-
Code: Select all
if (lozzaHost == HOST_NODEJS) {
%NeverOptimizeFunction(lozBoard.prototype.ttInit);
}
Apologies if you know all this node stuff
Thanks for the comment on the UI - chessboard.js you know and the lovely buttons and general presentation is courtesy of the most awesome Twitter bootstrap.
-
- Posts: 490
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Stockfish in Lozza UIs
PS: GarboChess 64 bit Windows exe I was messing around with - may be useful: http://op12no2.me/toys/lozza/garbo.zip