Home » Koivisto: A Next-Generation Chess Engine
Koivisto chess engine

Koivisto: A Next-Generation Chess Engine

In the realm of mind sports, chess has always stood as a monument to strategic thought and pattern recognition. Its timeless elegance and complexity have challenged human intellect for centuries. But as we stepped into the era of artificial intelligence, the classic game of chess has served as a battleground, a testbed for the capabilities of our algorithms and computational prowess. And among these digital combatants, there stands a new champion—Koivisto, a next-generation chess engine that’s pushing the boundaries of AI’s potential. What is the Koivisto chess engine?

Engineered from the ground up with cutting-edge AI methodologies, Koivisto embodies the future of computer chess. Unlike its predecessors, which often rely heavily on hard-coded strategies and predetermined move libraries, Koivisto harnesses the raw power of machine learning. It offers a chess-playing experience that not only rivals human grandmasters but also exposes new dimensions in gameplay that are utterly revolutionary.

Deep-rooted in the concept of reinforcement learning, Koivisto continuously improves its performance by playing millions of games against itself. Every win, loss, and draw feeds into its ever-evolving neural network, refining its understanding of the game and honing its strategies. This self-training mechanism ensures that Koivisto always stays on the cutting edge of chess theory, constantly adapting and improving.

Koivisto – Stockfish: 1-0

What is the Koivisto Chess Engine?

Koivisto stands as a prime example of the innovative strides being made in the world of chess engines. First released in 2020, Koivisto is a remarkable collaborative creation by Kim Kahre and Finn Eggers. Having previously developed their own chess engines, Kahre and Eggers combined their expertise to bring Koivisto to life, revolutionizing computer chess in the process.

This advanced chess engine doesn’t operate in isolation. Instead, it makes efficient use of the Universal Chess Interface (UCI) protocol, a standard adopted by all major chess Graphical User Interfaces (GUIs). With the UCI protocol, Koivisto can interact seamlessly with other engines or human players, demonstrating its skills and strategies.

But what truly sets Koivisto apart is its sophisticated algorithmic foundation. The engine uses a Principal Variation Search, an enhanced version of the traditional minimax algorithm common in game theory and decision processes. This variant is designed to focus computational power on the most promising moves, ignoring less fruitful variations. This more discerning and efficient search process enables Koivisto to deliver superior performance, presenting challenging gameplay for even the most seasoned chess enthusiasts.

See also  Asus Zenbook S 13 OLED UM5302 review – the powerful compact ultrabook

Adding another layer of brilliance, Koivisto is powered by a highly efficient neural network. This network has been trained on billions of chess positions, learning and evolving from each one. As a result, the engine brings a remarkable depth of knowledge and understanding to each game it plays.

In the competitive arena of computer chess, Koivisto has proven its mettle, standing shoulder to shoulder with the best in the field. The advanced architecture and capabilities of this engine make it a fascinating subject of study for anyone interested in AI, machine learning, or the intricate world of chess strategy. To play against the Koivisto chess engine, download it here.

Download Koivisto
Download Koivisto

What is the Principal Variation Search Algorithm?

Principal Variation Search (PVS), also known as NegaScout or Alpha-Beta with Memory, is an optimization of the alpha-beta pruning algorithm for two-player, zero-sum games such as chess. It’s commonly used in chess engines to significantly improve the efficiency of the search process.

Basic Concept

The concept of PVS is based on the observation that good move ordering significantly improves the efficiency of the alpha-beta pruning. In the game of chess, this means that the engine searches the most promising move (the “principal variation”) first.

How it Works

In each position, PVS begins by searching the first (presumably best) move using a full window. For the remaining moves, it uses a minimal window (also known as null window or zero window), because it assumes they are not as good as the first one and they would not affect the decision made at the parent node. This is the so-called “null window search” or “zero-window search.”

If during this minimal window search the algorithm finds a move that is better than the first move, it recognizes that its assumption was wrong. Consequently, it carries out a re-search with a full window to get a precise evaluation.


This method is efficient because it exploits the fact that in well-ordered trees, the first move is usually the best one, and re-searches are rare. By using a narrow search window for all moves except the first, it saves computing time and resources and makes the chess engine much faster and more efficient.

See also  Best Drone Companies


While PVS is generally more efficient than basic alpha-beta search, the performance heavily depends on the quality of move ordering. If the moves are poorly ordered (i.e., the best moves are not searched first), PVS could perform even worse than a simple alpha-beta pruning. That’s why sophisticated heuristics for move ordering are essential in modern chess engines using PVS.

How is Koivisto Developed?

Koivisto, an advanced chess engine, is continually shaped and enhanced by a dedicated group of core developers, primarily using C++ and Python among other languages. The development process involves ideation, execution of various concepts, and rigorous performance testing, primarily through the OpenBench framework. This framework enables distributed testing over multiple machines, aggregating results to statistically determine the impact of each modification. OpenBench also hosts a community of open-source engines, collectively known as the “OpenBunch,” where developers exchange ideas and learnings, enriching the development of Koivisto. The codebase, including all tools used for development, remains open-source, inviting anyone to test and contribute changes, emphasizing the importance of community collaboration and transparency in Koivisto’s evolution.

Their approach involves brainstorming innovative ideas, testing various implementations, and measuring the impact on the engine’s strength. A critical tool in this process is the OpenBench framework, which enables distributed testing across multiple machines, analyzing the effectiveness of changes using Sequential Probability Ratio Testing (SPRT). The OpenBench framework encourages anyone to test their changes, requiring only a fork of the main Koivisto repository and a communication with the core developers or submission of a patch through a personal account. This open-source spirit has been vital to Koivisto’s development and success.


Here is a summary of the features of the Koivisto chess engine:

Programming LanguageMainly developed in C++ with additional programming languages such as CUDA and Python used for various development tools.
Core EngineConsists of approximately 5000 lines of code, signifying an efficient and compact design.
UCI CompatibilityUses the Universal Chess Interface (UCI) protocol, enabling it to interface with other chess engines and human players via GUIs.
AlgorithmEmploys a Principal Variation Search (PVS), an optimization of the alpha-beta pruning algorithm, focusing on the most promising moves to enhance efficiency.
Neural NetworkUtilizes a highly efficient neural network trained on billions of chess positions to refine its decision-making process and understanding of the game.
Syzygy TablebaseUses an external C library, Fathom, for syzygy tablebase probing, enabling it to access endgame databases for precise evaluations.
Open SourceLicensed under GPLv3 and committed to open-source principles, enabling the community to understand, contribute, and benefit from its development.
Development ToolsA suite of internally developed tools to support the engine’s development, all of which are also open source.
OpenBench FrameworkUses the OpenBench framework for distributed testing across multiple machines, validating statistically significant improvements to the engine’s performance.
Collaboration and TestingActively participates in a community of open-source engines (known as the OpenBunch), fostering an environment of mutual learning and idea exchange.
Koivisto Summary

The Koivisto chess engine represents a milestone in the evolution of chess engines, intertwining advanced algorithms, machine learning, and open-source principles. Its continuous development, fueled by a dedicated community, promises ongoing innovation. As a testament to the future of AI, Koivisto illuminates new possibilities in the realm of strategy games and beyond.

Related Posts

Leave a Comment