Skip to content
op12no2Public

About

A UCI Javascript chess engine.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

71 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lozza

A Javascript UCI chess engine that can be used in a Web Worker and Node.

Lozza is easy to read and tweak; it's also easy to deploy and is WSAM-free.

Release versions are additionally available as assets for Windows and Linux; ping me if you would like one for a different platform.

Web hello world

All you need is lozza11.0.js from the latest release.

const dump = document.getElementById('dump');
const lozza = new Worker('lozza11.0.js');

lozza.onmessage = function (e) {
  dump.textContent += e.data + '\n';
};

lozza.postMessage('uci');
lozza.postMessage('ucinewgame');
lozza.postMessage('position startpos');
lozza.postMessage('go depth 10');

Try it here: https://op12no2.github.io/lozza/examples/hello_world.html

Node

node lozza.js                     # interactive
node lozza.js uci "go depth 10" q # exec commands and exit

Notes

  • Don't use the repo lozza.js because it doesn't have any weights; always use the latest release.
  • The code is best read with a folding editor; I use foldit in a WSL terminal - link below.
  • Lozza needs a rewrite. It's pretty ugly with a 12x12 board inherited from my 1980 engine and search is way behind the hobby coalface.

Acknowledgements

About

A UCI Javascript chess engine.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages