A UCI Javascript chess engine.
Lozza was primarily created for use in browsers, but can also be used with traditional chess user interfaces (see below).
All you need is lozza.js from the latest release (not the repo).
Here is a little example to do a 10 ply search:-
var lozza = new Worker('lozza.js');
lozza.onmessage = function (e) {
$('#dump').append(e.data); // assuming jquery and a div called #dump
// parse messages from here as required
};
lozza.postMessage('uci'); // lozza uses the uci communication protocol
lozza.postMessage('ucinewgame'); // reset tt
lozza.postMessage('position startpos');
lozza.postMessage('go depth 10'); // 10 ply search
Note that Lozza must be fired up in a web worker.
The most straightfoward way is to use one of the binaries from the latest release.
Alternatively install Node or Bun and use lozza.js via a batch file; for example:
"c:\program files\nodejs\node.exe" "c:\path\to\lozza.js"
option name Hash type spin default 16 min 1 max 1024
option name MultiPV type spin default 1 min 1 max 500