PHPackages                             kesty/uci-chess - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kesty/uci-chess

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kesty/uci-chess
===============

Wrappers to run UCI chess engines, matches and tournaments

v1.0.0(3y ago)01MITPHP ^8.0

Since Jul 30Pushed 3y ago2 watchersCompare

[ Source](https://github.com/olubunmitosin/uci-chess)[ Packagist](https://packagist.org/packages/kesty/uci-chess)[ RSS](/packages/kesty-uci-chess/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

uci-chess
=========

[](#uci-chess)

PHP wrapper classes for interfacing with UCI chess engines.

Getting started
---------------

[](#getting-started)

From the root of your application

```
composer require kesty/uci-chess

```

Unless using a framework where autoloading is already taken care of, you'll need to

```
include 'vendor/autoload.php';

```

Then, include the classes that you want to use, e.g.

```
use Netsensia\Uci\Engine;
use Netsensia\Uci\Match;
use Netsensia\Uci\Tournament\RoundRobin;

```

Search for a move
-----------------

[](#search-for-a-move)

```
$engine = new Engine();

// Native application or Jar file?
$engine->setApplicationType(Engine::APPLICATION_TYPE_JAR);

// The location of the chess engine on the local file system
// You can download my engine, RivalChess from https://github.com/chris-moreton/rival-chess-android-engine/tree/master/dist
// If the engine requires any parameters, simply add them after the path
$engine->setEngineLocation('/path/to/engine.jar [params]');

// Set engine parameters
$engine->setMode(Engine::MODE_NODES);
$engine->setModeValue(100000);

// Set the starting position of the match (before any moves have been played)
$engine->setPosition(Engine::STARTPOS);

// Send the move history and get the move
$move = $engine->getMove('e2e4 d7d5');

// Important! - remove the process
$engine->unloadEngine();

```

Run a match
-----------

[](#run-a-match)

```
$whiteEngine = new Engine('/path/to/engine1.jar');

// No reason why you can't use the same engine if you want to test against different parameters
$blackEngine = new Engine('/path/to/engine2.jar');

$whiteEngine->setMode(Engine::MODE_NODES);
$whiteEngine->setModeValue(100);
$whiteEngine->setApplicationType(Engine::APPLICATION_TYPE_JAR);
$whiteEngine->setLogEngineOutput(false);

$blackEngine->setMode(Engine::MODE_NODES);
$blackEngine->setModeValue(10000);
$blackEngine->setApplicationType(Engine::APPLICATION_TYPE_JAR);
$blackEngine->setLogEngineOutput(false);

$match = new Match($whiteEngine, $blackEngine);

$result = $match->play();

echo $result['fen'] . PHP_EOL;

switch ($result['result']) {
    case Match::DRAW: echo 'Draw';
        break;
    case Match::WHITE_WIN: echo 'White win';
        break;
    case Match::BLACK_WIN: echo 'Black win';
        break;
}

$whiteEngine->unloadEngine();
$blackEngine->unloadEngine();

```

Run a tournament
----------------

[](#run-a-tournament)

```
$tournament = new RoundRobin();

// for each engine...
$engine = new Engine('/path/to/engine1.jar');
$engine->setMode(Engine::MODE_NODES);
$engine->setModeValue(100);
$engine->setApplicationType(Engine::APPLICATION_TYPE_JAR);
$engine->setLogEngineOutput(false);
$engine->setName('Engine 1');
$tournament->addEngine($engine);

...

foreach ($tournament->matches() as $match) {
    echo $match->getWhite()->getName() . ' v ' . $match->getBlack()->getName() . PHP_EOL;
    $tournament->play($match);
    $echo $tournament->table();
}

$tournament->showTable();

$tournament->close();

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1381d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7978a46601b22c02edd1e108652d0c4d81943d18a5769e9d97564d23294ca0ee?d=identicon)[olubunmi708](/maintainers/olubunmi708)

### Embed Badge

![Health badge](/badges/kesty-uci-chess/health.svg)

```
[![Health](https://phpackages.com/badges/kesty-uci-chess/health.svg)](https://phpackages.com/packages/kesty-uci-chess)
```

###  Alternatives

[aws/aws-sdk-php-symfony

A Symfony bundle for v3 of the AWS SDK for PHP

36517.7M22](/packages/aws-aws-sdk-php-symfony)[csharpru/vault-php

Best Vault client for PHP that you can find

8410.3M4](/packages/csharpru-vault-php)[napp/xray-laravel

AWS X-Ray for Laravel applications.

61407.3k](/packages/napp-xray-laravel)[helgesverre/extractor

AI-Powered Data Extraction for your Laravel application.

22128.0k](/packages/helgesverre-extractor)[dreamonkey/laravel-cloudfront-url-signer

Laravel 5.6+ wrapper around CloudFront canned signed URLs

54750.7k](/packages/dreamonkey-laravel-cloudfront-url-signer)[foxxmd/laravel-elasticbeanstalk-cron

Ensure only one Laravel instance is running CRON jobs in an EB environment

62299.6k](/packages/foxxmd-laravel-elasticbeanstalk-cron)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
