Skip to content
/ uci Public
forked from acdemiralp/uci

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

License

Notifications You must be signed in to change notification settings

4real/uci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Example Usage

chess_engine your_engine;
uci uci;

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

// Start communication with the UI through console.
uci.launch();

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.9%
  • CMake 1.1%