Skip to content
Michel Gutierrez edited this page Apr 27, 2017 · 17 revisions

Some popular games like Chess are blessed with high quality engines that provide extremely powerful artificial intelligences to play against. In general those engines are text-based programs that do no provide a nice user interface. Instead, they rely on a few standard protocols to interface with user interface programs like WinBoard, XBoard and JoclyBoard.

However, interfacing UI and AI programs often requires a little bit of configuration. In the future, JoclyBoard may provide preset configurations for most popular engines, but for now, you might need to perform some tuning to make both programs cooperate. Do not worry, most of the times, a copy/paste is enough.

Once you created an engine in JoclyBoard, it is saved to the persistent configuration so you can use it as either or both players in a game at any time in the future.

A JoclyBoard engine has the following properties:

  • Name: so you can refer to this label to assign the player to the engine
  • Protocol: as of now, it can be UCI or CECP for Chess and variants and Hub for Draughts
  • Binary path: most of the time, JoclyBoard launches automatically the engine, so you need to tell him where to find the program
  • Details: this one is more tricky and contains a number of optional fields to tune. This field is a text in YAML format that defines a configuration object. The specifications of the details are provided below but you may be more interested by just picking the configuration for the engine you want to run

Engine configuration cooking book

Note: the configurations below are minimal. In many cases, you can (and should) add arguments to the engine programs to load opening libraries.

Stockfish/Chess

Game: Chess

Protocol: UCI

Details: leave empty

Scan/Draughts/HUB

Game: International Draughts

Protocol: Hub

Details:

args:
  - hub
initialCommands:
  - init
workingDir: path-to-where-scan-is-installed

Do not forget to replace path-to-where-scan-is-installed by the actual location where scan is installed.

Scan/Draughts/DXP

Game: International Draughts

Protocol: Dxp

Details:

# parameters below are optional, but useful to autostart Scan DXP server
binary: path-to-scan-binary
args:
  - dxp
workingDir: path-to-where-scan-is-installed
# port must match the one specified in scan.ini, default 27531
# port: 27531

Mobydam/Draughts

Game: International Draughts

Protocol: Dxp

Details:

# parameters below are optional, but useful to autostart Mobydam DXP server
binary: path-to-mobydam-binary
# port: 27531

GnuChess v6/Chess/CECP

Game: Chess

Protocol: CECP

Details:

initialCommands:
  - xboard
movePattern: "My move is :\\s*(\\S+)"

GnuChess v6/Chess/UCI

Game: Chess

Protocol: UCI

Details:

args:
  - --uci

Fruit/Chess

Game: Chess

Protocol: UCI

Details: leave empty

Crafty/Chess

Game: Chess

Protocol: CECP

Details:

initialCommands:
  - xboard

Fairymax/Chess

Game: Chess

Protocol: CECP

Details: leave empty

MaxQi/XiangQi

Game: XiangQi

Protocol: CECP

Details:

variant: xiangqi

FairyMax/Makruk

Game: Makruk

Protocol: CECP

Details:

variant: makruk

FairyMax/Capablanca

Game: Capablanca

Protocol: CECP

Details:

variant: capablanca

FairyMax/Shatranj

Game: Shatranj

Protocol: CECP

Details:

variant: shatranj

FairyMax/Courier

Game: Courier Chess

Protocol: CECP

Details:

variant: courier
boardSetup: ["edit","#",
  "Pa4","Pb2","Pc2","Pd2",
  "Pe2","Pf2","Pg4","Ph2",
  "Pi2","Pj2","Pk2","Pl4",	 
  "Ra1","Nb1","Ec1","Bd1",
  "Me1","Kf1","Fg3","Wh1",
  "Bi1","Ej1","Nk1","Rl1",
  "c",	
  "Ra8","Nb8","Ec8","Bd8",
  "Me8","Kf8","Fg6","Wh8",
  "Bi8","Ej8","Nk8","Rl8",			     
  "Pa5","Pb7","Pc7","Pd7",
  "Pe7","Pf7","Pg5","Ph7",
  "Pi7","Pj7","Pk7","Pl5",
  "."]

FairyMax/Cylinder Chess

Game: Cylinder Chess

Protocol: CECP

Details:

variant: cylinder

Dreamer/Chess

Game: Chess

Protocol: CECP

Details: leave empty

Hoichess/Chess

Game: Chess

Protocol: CECP

Details:

initialCommands:
  - xboard

Sjeng/Chess

Game: Chess

Protocol: CECP

Details:

initialCommands:
  - xboard
movePattern: "move\\s+([a-h]\\S+)"

Phalanx/Chess

Game: Chess

Protocol: CECP

Details:

initialCommands:
  - xboard
movePattern: "my move is\\s+(\\S+)"

Glaurung/Chess

Game: Chess

Protocol: UCI

Details: leave empty

Senpai/Chess

Game: Chess

Protocol: UCI

Details: leave empty

Engine details

The configuration object may have the properties:

  • args: the arguments passed to the engine program when launched. It is an array of strings. By default, the engine is launched without any argument. For instance,
  args:
    - --uci

when applied to a program like gnuchess is equivalent to launching the command with gnuchess --uci

  • workingDir: an optional string representing the path of the directory where to launch the engine from
  • debug: a boolean indicating whether you want the JoclyBoard/engine dialog to be printed to the console. Default is false.
  • initialCommands: an optional array of strings passed to the engine right after it has been launched height (default 10) is the number of rows on the board
  • variant: some engines accept alternative chess rules by specifying a variant string
  • movePattern: a regular expression, expressed as a string, to identify the move chosen by the engine in its output. For instance move\\s+(\\S+) will extract the move string e7e5 in the engine output line move e7e5
  • boardSetup: an array of strings passed to the engine to initialize the board. This is useful in case Jocly and the engine disagree on the initial board state
  • defaultClock: if the match is not timed, this parameter represents the number of milliseconds the engine is told to have remaining
  • binary: an optional path to a binary program that starts an engine in server mode. Some engine/GUI protocols rely on a socket-based connection. When JoclyBoard tries to connect to the engine, it first attempts to connect to the given host/port. If this fails, and binary is defined, it will first launch the program's binary and retry to connect. args and workingDir apply to this binary launch
  • port: port to be used for server based protocols (default depends on the protocol itself, for DXP, it's 27531)
  • host: hostname or IP address to be used for server based protocols, default is "127.0.0.1"
  • launchDelay: the time in milliseconds to wait after launching the engine server binary
  • restart: if set to true, the engine process is killed after each move request