chess ajedrez escacs شطرنج échecs xadrez scacchi шахматы

Engine operation

Chess engines are computer programs able to find good continuations for a given position. They wont give you the absolute best continuation, but belive me, they will give you very good lines. The way they look for a line, is by evaluating certain movements. For example, after 1.e4 e5 it could be played Nc3 followed by Nf6, or Nc3 followed by d6, or by Bb4 and so on ... This data structure becomes a tree, where each position, related to each possible movement, is a node. This tree grows incredibly fast as you look deeper, and the engines have to evaluate a lot of lines in order to find an acceptable one. It is so big that it is estimated to be bigger than the number of atoms in the entire observable universe, that's why chess programs can't save every single line in a data base, it is still physically impossible (maybe with quantum computers).

As a result, it is not practical to try to find a winning line from the majority of positions, specially for those in which there is no clear advantage. The engine would have to look too deep to give you a winning line, consuming in most cases, too much time.

Those are the key concepts, depth and time.

You can tell the engine how many time you want to spend looking for a good line, or you can tell the engine how deep in the tree it should look for it.

In the first case, line's depth is undefined, it depends on the computer the engine is running on, the position itself and other factors. The response for different analysis will be of different depth.

In the second case, what is undefined is the time the engine will spend searching for a line with a given depth. This time the consumed time will vary between different analysis, for different positions.

No method is better, it depends on the circumstance.

Engines have to evaluate each node in order to give them a punctuation, to make comparisons between different continuations. Here is where the difference between engines resides.
Stronger engines evaluate each position more accurately than weaker engines, and the same happens with the lines it discards in order to not evaluate the entire tree, stronger engines discard lower scored lines better than weaker engines, saving wasted time.

Learn how to use the analysis tool at youtube.com



standardchess.com utilizes time based analysis only when a live match is observed.
You can change it in the movetime field. A value of 0.4, it will tell the engine to spend 0.4 (almost a half) seconds per position.
Depth based analysis is made for automatic responses, like puzzles, and for position analysis. A depth of 12, it will tell the engine to look for an acceptable line up to 12 movements (called plies).
The third value called multipv is for the quantity of lines you want to retrieve from the engine. Most of the time you want to get only a good line, but there are engines that can give you more than a single scored line. It is useful when a bad move was made, and you want to see better possible continuations. A value of 3, it will tell the engine (if supported) that you want not only one, but up to 3 possible continuations.

Available engines

standardchess.com comes with some integrated engines by default, but it is possible to add external engines. Available integrated engines are:

- Garbo 6.0 : javascript engine made by Gary Linscott
- Lozza 1.16 a : javascript engine made by Colin Jenskins
- Stockfish 5 JS : stockfish 5 javascript port
- Stockfish 6 JS : stockfish 6 javascript port
- Stockfish 6 ARM (only for Android app) ARM compiled Stockfish 6
- Custom HTTP server (this is for adding external engines)

How to add external engines

You can add external engines by selecting "Custom HTTP server" from the available engines list. It is necessary 2 components in order to make it work, namely, a server and the engine itself

You can create a simple server in your computer by running this javascript EngineServer.js with Node.js
Once node.js is installed you can run the following command in a terminal

nodejs EngineServer.js port=9080 engine=/path/to/your/engine

This command will instantiate a very simple http server. You can safely run it on your local computer, but if you want to make it public you should make some security changes to the code, like a maximum allowed depth or evaluation time, etc.
Once running, by selecting "Custom HTTP server" the app will try to connect to it when necessary

Tested external chess engines

Arasan 19.0.1 linux-x64
BikJump v2.01 linux-x64
Cinnamon 2.0 linux-x64
Daydreamer 1.75 JA linux-x64
Critter 1.6a linux-x64
Fruit 2.2.1 linux-x64
Komodo 7 linux-x64
Maverik 1.5 linux-x64
Pawny 1.1 linux-x64
RedQueen 1.1.98 linux-x64
Stockfish 6/7 linux-x64 osx-x64

Resources

The Chess Programming Wiki is a repository of information about programming computers to play chess