Skip to content

Hengyu/ChessEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChessEngine

ChessEngine is an open source chess engine framework for iOS. The internal ultra-strong chess engine is Stockfish.

Usage

Installation

You have multiple choices to make use of ChessEngine framework.

  • Copy /ChessEngine/ChessEngine to your project.
  • Drag-n-drop ChessEngine project to your project. Carthage installation will be supported in the future.

Quick start

Just a few lines of code:

import ChessEngine
// ..some code..
let engineManager: EngineManager = EngineManager()
engineManager.delegate = self
engineManager.gameFen = someGameFen
engineManager.startAnalyzing()

Delegate

required public func engineManager(_ engineManager: EngineManager, didReceiveBestMove bestMove: String?, ponderMove: String?)
 
optional public func engineManager(_ engineManager: EngineManager, didAnalyzeCurrentMove currentMove: String, number: Int, depth: Int)

optional public func engineManager(_ engineManager: EngineManager, didReceivePrincipalVariation pv: String)

optional public func engineManager(_ engineManager: EngineManager, didUpdateSearchingStatus searchingStatus: String)

Related

ChessEngine framework is inspired by the open sourced project Stockfish for iOS, it’s source code can be downloaded from here. I found this project has not been updated for a long time and it’s internal engine is stockfish 6, while the latest version is stockfish 8. So I decided to create an iOS framework that uses stockfish 8.

Thanks.

Stockfish for macOS can be found here stockfish-mac.

Contribution

Pull requests and issues are welcomed. If the pull requests are related to Stockfish engine, please go to it’s page and make pull requests.

License

GNU GENERAL PUBLIC LICENSE (Version 3). You can go to license file to see the full version.