Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

144 Commits

Repository files navigation

UCI

NOTE:This version is not backwards compatible with 0.2.x series of releases.

UCI is a thin wrapper on a uci interface chess engine.

Installation

Make sure you have node.js installed. Then do:

$ npm install uci

Example

varEngine=require('uci');varengine=newEngine('<path to engine executable>');engine.runProcess().then(function(){console.log('Started');returnengine.uciCommand();}).then(function(idAndOptions){console.log('Engine name - '+idAndOptions.id.name);returnengine.isReadyCommand();}).then(function(){console.log('Ready');returnengine.uciNewGameCommand();}).then(function(){console.log('New game started');returnengine.positionCommand('startpos','e2e4 e7e5');}).then(function(){console.log('Starting position set');console.log('Starting analysis');returnengine.goInfiniteCommand(functioninfoHandler(info){console.log(info);});}).delay(2000).then(function(){console.log('Stopping analysis');returnengine.stopCommand();}).then(function(bestmove){console.log('Bestmove: ');console.log(bestmove);returnengine.quitCommand();}).then(function(){console.log('Stopped');}).fail(function(error){console.log(error);process.exit();}).done();

API

See here for API reference.

Contributing

Fork, pick an issue to fix from issues or add a missing feature and send a pull request.

License

UCI is released under the MIT License. See the bundled LICENSE file for details.

About

A thin wrapper on a uci chess engine

Topics

Resources

Stars

33 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages