Stockfish engine iOS integration

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

stan4olino
Posts: 2
Joined: Thu May 05, 2016 12:28 am

Stockfish engine iOS integration

Post by stan4olino »

Hi chess masters, I am a very new in the gaming development and I have the task of using the Stockfish engine to create an iPad game but find it difficult to figure out how to connect the engine with my code and what parts of the ios source code do I need and what I don't. Is there a structured list of steps that a developer should follow in order to use the engine in iOS.

Thank you for your time
Stan
stancho stanchev @ dynoden.com
User avatar
hgm
Posts: 28515
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stockfish engine iOS integration

Post by hgm »

I don't have any Apple systems, but I heard that it is impossible in iOS to have one process start up another, and communicate to it. This means the usual model for GUI/engine separation cannot work on iOS.

So the GUI and engine would have to be merged into a single program, executed as a single process on iOS. This is of course is possible, but in the case of Stockfish it would only be legally possible if you also publish your own code for the GUI part under the GPL.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Stockfish engine iOS integration

Post by Evert »

hgm wrote:This is of course is possible, but in the case of Stockfish it would only be legally possible if you also publish your own code for the GUI part under the GPL.
It's worse han that: Apple's licence is incompatible with the GPL, so you need to dual-licence the code. The GPL doesn't allow you to change the licence of code that isn't your own, so you need permission from every single Stockfish developer to change the licence on it.

Tord used Glaurung rather than Stockfish as the engine behind the Play Magnus app for exactly this reason.

Bottom line: don't go there.
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: Stockfish engine iOS integration

Post by casaschi »

Evert wrote:It's worse han that: Apple's licence is incompatible with the GPL, so you need to dual-licence the code. The GPL doesn't allow you to change the licence of code that isn't your own, so you need permission from every single Stockfish developer to change the licence on it.
How do you explain this app then?
https://itunes.apple.com/en/app/stockfi ... d305558605
In the description they even refer to the GPL.
stan4olino
Posts: 2
Joined: Thu May 05, 2016 12:28 am

Re: Stockfish engine iOS integration

Post by stan4olino »

I don't think that would be needed as there are apps out there that use the same engine.
Thanks for the comments but I asked something different. Have a good day!
stancho stanchev @ dynoden.com
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Stockfish engine iOS integration

Post by Evert »

casaschi wrote:
Evert wrote:It's worse han that: Apple's licence is incompatible with the GPL, so you need to dual-licence the code. The GPL doesn't allow you to change the licence of code that isn't your own, so you need permission from every single Stockfish developer to change the licence on it.
How do you explain this app then?
https://itunes.apple.com/en/app/stockfi ... d305558605
In the description they even refer to the GPL.
Look at the author list.

Tord, Marco and Joona can decide what they want to do with their own code. That includes relicensing it for iOS. The app is based on an older version of Stockfish (look at the date). With a small team it's possible to come to an agreement on what to do with the code, especially if you're part of that team. For code that is developed collectively through small contributions and updates from a community (Stockfish currently follows this model) this is not so easy anymore, even if you know who to contact.

Basically, if you're Tord and you ask Marco and Joona whether they'll agree to relicense the code you worked on for iOS, you're good. If you're a random person on the internet who needs to ask permission from a large (and somewhat anonymous; I'm not aware of a comprehensive list of Stockfish authors, but such can of course be reconstructed from the git logs) group of people you don't know, don't bother.