gladius wrote:
Awesome!! Thanks so much

.
Is there a way to do engine-engine play in your UI?
Really nice web UI too btw

.
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.
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
I started with a depth 1 search and worked from there. I've only got to depth 3 without any deoptimising so far
--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);
}
You can also trace what is and isn't optimised etc etc. I'm guessing it's possible to get a really good performance (to compete with some of the better native executables out there) from a Javascript chess engine in this way, but I'm probably not the person to eventually do it.
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.