I am working on a 3D Chess game and I want to implement an A.I bot to play with the player. I found a chess engine called Stockfish which serves this purpose, and I would like to implement that engine in my project.

Is it as simple as including the Stockfish code in my project or importing a binary as a plugin, or do I have to do something more complex because of the GPL licence?

  • 1
    \$\begingroup\$ I saw some votes to close this question as too broad, so I've proposed an edit to bring it into a more comfortable scope. Once you understand your options at this level and have researched the directions suggested in the answers, please feel free to make new posts to ask additional follow-up questions about each step of the implementation that you want help with. \$\endgroup\$
    – DMGregory
    Jan 27, 2017 at 18:27

1 Answer 1


You can implement their code as a plugin in your game, as long as you plan for your game to also be GPL-licensed.

You cannot incorporate Stockfish into a proprietary product, in the sense of bundling them together so that the user perceives them as a single program - which arguably describes typical methods of using 3rd-party plugins within your Unity project.

You cannot incorporate GPL-covered software in a proprietary system. The goal of the GPL is to grant everyone the freedom to copy, redistribute, understand, and modify a program.

You still have other options if your game is proprietary:

However, in many cases you can distribute the GPL-covered software alongside your proprietary system. To do this validly, you must make sure that the free and non-free programs communicate at arms length, that they are not combined in a way that would make them effectively a single program.


If the two programs remain well separated, like the compiler and the kernel, or like an editor and a shell, then you can treat them as two separate programs—but you have to do it properly.

I am not an expert in this matter, so I will leave this as a community wiki to be updated by other users. Here is a sketch of how I think you could proceed:

  • Create an installer for your game that installs your Unity executable and assets in one place, and Stockfish separately.

  • Your game runs the Stockfish program, communicating with it using Universal Chess Interface commands.

  • You provide a configuration setting where a player can choose to redirect this behaviour to use a different UCI-compatible chess engine if they so choose, so the two programs can operate independently of each other.

  • \$\begingroup\$ Basic rule of thumb : As a player of your game I have to be able to put my own modified implementation of Stockfish and it should "just work". This IMHO is the barest minimum tip-of-the-toe dip in GPL world of software engineering. I'm no lawyer though, it might not be enough. \$\endgroup\$
    – Newtopian
    May 30, 2019 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .