SkillAgentSearch skills...

Uci

Single header implementation of the Universal Chess Interface (UCI) protocol.

Install / Use

/learn @acdemiralp/Uci
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

UCI

The Universal Chess Interface (UCI) is an open chess communication protocol used by chess engines to communicate with graphical user interfaces.

This repository contains a single header implementation of the UCI protocol (April 2006) in C++11. Requires boost::signals2.

Example Usage

chess_engine your_engine;
uci uci;

// Register callbacks to the messages from the UI and respond appropriately.
uci.receive_uci.connect([&] ()
{
  uci.send_id("Engine name", "Author name");
  uci.send_option_uci_limit_strength(false);
  uci.send_uci_ok();
});
uci.receive_is_ready.connect([&] ()
{
  uci.send_ready_ok();
});
uci.receive_position.connect([&] (const std::string& fen, const std::vector<std::string>& moves)
{
  your_engine.set_position(fen, moves);
});
uci.receive_go.connect([&] (const std::map<uci::command, std::string>& parameters)
{
  your_engine.start_search();
});

// Start communication with the UI through console.
uci.launch();
View on GitHub
GitHub Stars11
CategoryDevelopment
Updated8mo ago
Forks4

Languages

C++

Security Score

87/100

Audited on Jul 17, 2025

No findings