{"id":37231028,"url":"https://github.com/op12no2/lozza","last_synced_at":"2026-01-15T03:41:22.084Z","repository":{"id":51088897,"uuid":"74671511","full_name":"op12no2/lozza","owner":"op12no2","description":"A UCI Javascript chess engine.","archived":false,"fork":false,"pushed_at":"2025-11-14T10:52:52.000Z","size":25570,"stargazers_count":51,"open_issues_count":1,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-14T12:29:17.758Z","etag":null,"topics":["chess","chess-engine","javascript","neural-network","nnue","node","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/op12no2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-11-24T12:31:48.000Z","updated_at":"2025-11-14T10:52:55.000Z","dependencies_parsed_at":"2024-01-30T18:16:46.753Z","dependency_job_id":"b049a143-f16b-4289-a4b2-a6b257ffab3c","html_url":"https://github.com/op12no2/lozza","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/op12no2/lozza","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op12no2%2Flozza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op12no2%2Flozza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op12no2%2Flozza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op12no2%2Flozza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/op12no2","download_url":"https://codeload.github.com/op12no2/lozza/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op12no2%2Flozza/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","chess-engine","javascript","neural-network","nnue","node","nodejs"],"created_at":"2026-01-15T03:41:21.412Z","updated_at":"2026-01-15T03:41:22.076Z","avatar_url":"https://github.com/op12no2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lozza\n\nA UCI Javascript chess engine.\n\nLozza was primarily created for use in browsers, but can also be used with traditional chess user interfaces (see below). \n\n## Basic use in a browser\n\nAll you need is ```lozza.js``` from the latest release (not the repo).  \n\nHere is a little example to do a 10 ply search:-\n\n```Javascript\nvar lozza = new Worker('lozza.js');      \n\nlozza.onmessage = function (e) {\n  $('#dump').append(e.data);             // assuming jquery and a div called #dump\n                                         // parse messages from here as required\n};\n\nlozza.postMessage('uci');                // lozza uses the uci communication protocol\nlozza.postMessage('ucinewgame');         // reset tt\nlozza.postMessage('position startpos');\nlozza.postMessage('go depth 10');        // 10 ply search\n```\n\nTry this example here:-\n\n- https://op12no2.github.io/lozza-ui/ex.htm\n\nNote that Lozza must be fired up in a web worker.\n\n## More examples\n\nA sister repo has more browser-based examples for playing and analysing with Lozza.\n\n- https://github.com/op12no2/lozza-ui\n\n## Play Lozza online\n\n- https://op12no2.github.io/lozza-ui\n\n## Play Lozza offline in chess user interfaces\n\nThe most straightfoward way is to use one of the binaries from the latest release. \n\nAlternatively install [Node](https://nodejs.org/en) or [Bun](https://bun.com) and use ```lozza.js``` via a batch file; for example:\n\n```\n\"c:\\program files\\nodejs\\node.exe\" \"c:\\path\\to\\lozza.js\"\n```\n\n## UCI options\n\n```\noption name Hash type spin default 16 min 1 max 1024 \noption name MultiPV type spin default 1 min 1 max 500 \n```\n\n## Running Lozza from the command line\n\nAgain, use one of the binaries from the latest release or for example:-\n\n```\nnode lozza.js\n```\n\nCommands can be given as arguments:-\n\n```\nnode lozza.js uci ucinewgame \"position startpos\" \"go depth 10\" quit\n./lozza-win-x64.exe ucinewgame \"position startpos\" board quit\n```\n\nThere is also an online console:-\n\n- https://op12no2.github.io/lozza-ui/console.htm\n\n## Custom commands\n\n- quit - close Lozza.\n- board - display the board for the current position.\n- moves - display the moves for the current position.\n- eval - display the evaluation for the current position.\n- net - display network attributes.\n- bench - run a sequence of searches returning the toal node count and nps.\n- perft depth \u003cd\u003e - run a perft search from the current position using depth \u003cd\u003e.\n- pt - run a sequence of perft searches.\n- et - run a sequence of evaluations.\n\n## Development notes\n\nIf you clone the repo with the intention of tweaking Lozza or you want to load the weights from ```quantised.bin```, you need to be aware of the build process in ```build.sh```. This is a script that creates ```./lozza.js``` from ```src/*.js``` (contingent on ```quantised.bin```) and ```./releases/lozza.js``` which has the weights from ```quantised.bin``` inlined into it. It also creates binaries in ```./releases``` but you can remove that section. The version that reads ```quantised.bin``` (```./lozza.js```) is what I use for development and is what is in the root of the repo. The version in ```./releases``` is what I ship. ```build.sh``` will run natively on Linux and macOS but will need to run in WSL or git bash etc on Windows.  \n \n## References\n\n- https://nodejs.org - Node\n- https://www.chessprogramming.org/Main_Page - Chess programming wiki\n- https://computerchess.org.uk/ccrl/4040 - CCRL rating list\n- https://backscattering.de/chess/uci - UCI protocol\n- https://talkchess.com - Talkchess forums\n\n## Acknowledgements\n\n- https://www.chessprogramming.org/Fruit - Early versions of Lozza used a HCE based on Fruit 2.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop12no2%2Flozza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fop12no2%2Flozza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop12no2%2Flozza/lists"}