All Projects → imor → uci

imor / uci

Licence: MIT license
A thin wrapper on a uci chess engine

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to uci

liground
A free, open-source and modern Chess Variant Analysis GUI for the 21st century
Stars: ✭ 41 (+24.24%)
Mutual labels:  chess-engine, chess, uci
Demolito
UCI Chess Engine
Stars: ✭ 41 (+24.24%)
Mutual labels:  chess-engine, chess, uci
littlewing
Chess engine written in Rust ♛
Stars: ✭ 27 (-18.18%)
Mutual labels:  chess-engine, chess
stockfish-chess-web-gui
Responsive chess web GUI to play against the Stockfish 10 chess engine. Multiple web GUI implementations have also been included.
Stars: ✭ 21 (-36.36%)
Mutual labels:  chess-engine, chess
zahak
A UCI compatible chess AI in Go
Stars: ✭ 20 (-39.39%)
Mutual labels:  chess-engine, chess
magic-bits
A C++ header-only library for efficient move generation in Chess using "magic bitboards" technique
Stars: ✭ 26 (-21.21%)
Mutual labels:  chess-engine, chess
chess22k
Chessengine written in Java
Stars: ✭ 26 (-21.21%)
Mutual labels:  chess-engine, uci
bot-o-tron
Try out lichess' bot interface
Stars: ✭ 36 (+9.09%)
Mutual labels:  chess-engine, chess
rustic
Rustic is a chess engine. It is written from scratch, in the Rust programming language.
Stars: ✭ 68 (+106.06%)
Mutual labels:  chess-engine, chess
Sunfish
Sunfish: a Python Chess Engine in 111 lines of code
Stars: ✭ 2,254 (+6730.3%)
Mutual labels:  chess-engine, chess
Walleye
A chess engine written from scratch in Rust ♞
Stars: ✭ 82 (+148.48%)
Mutual labels:  chess-engine, chess
Zerofish
An implementation of the AlphaZero algorithm for chess
Stars: ✭ 34 (+3.03%)
Mutual labels:  chess-engine, chess
Realtime-OpenCV-Chess
♔ Chess-playing with Open-CV [Human vs AI (Stockfish engine)]
Stars: ✭ 18 (-45.45%)
Mutual labels:  chess-engine, chess
renpy-chess
A chess GUI built with Ren'Py, python-chess, and Stockfish. Version 2.0 of https://github.com/RuolinZheng08/renpy-chess-engine
Stars: ✭ 36 (+9.09%)
Mutual labels:  chess-engine, chess
OpenChess
A cross-platform chess game.
Stars: ✭ 18 (-45.45%)
Mutual labels:  chess-engine, chess
kokopu
A JavaScript/TypeScript library implementing the chess game rules and providing tools to read/write the standard chess file formats.
Stars: ✭ 18 (-45.45%)
Mutual labels:  chess, uci
eschecs
UCI chess GUI
Stars: ✭ 32 (-3.03%)
Mutual labels:  chess, uci
elephantfish
elephantfish: 一个只有124行的中国象棋引擎
Stars: ✭ 129 (+290.91%)
Mutual labels:  chess-engine, chess
Bit-Genie
UCI chess engine in C++
Stars: ✭ 19 (-42.42%)
Mutual labels:  chess-engine, chess
fastchess
Predicts the best chess move with 27.5% accuracy by a single matrix multiplication
Stars: ✭ 75 (+127.27%)
Mutual labels:  chess-engine, chess

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

var Engine = require('uci');
var engine = new Engine('<path to engine executable>');
engine.runProcess().then(function () {
    console.log('Started');
    return engine.uciCommand();
}).then(function (idAndOptions) {
    console.log('Engine name - ' + idAndOptions.id.name);
    return engine.isReadyCommand();
}).then(function () {
    console.log('Ready');
    return engine.uciNewGameCommand();
}).then(function () {
    console.log('New game started');
    return engine.positionCommand('startpos', 'e2e4 e7e5');
}).then(function () {
    console.log('Starting position set');
	console.log('Starting analysis');
    return engine.goInfiniteCommand(function infoHandler(info) {
        console.log(info);
    });
}).delay(2000).then(function () {
    console.log('Stopping analysis');
    return engine.stopCommand();
}).then(function (bestmove) {
    console.log('Bestmove: ');
    console.log(bestmove);
    return engine.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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].