I want to implement a chess app for Android with Stockfish.

I downloaded the Stockfish binary source code, but I don't know how to use engine

Please tell me how to use Stockfish engine for programming.


@Glorfindel is absolutely correct (+1). To get you started, do this:

  1. Read UCI specification (http://wbec-ridderkerk.nl/html/UCIProtocol.html)
  2. Download Droidfish source and check how it interacts with the engine
  3. Learn how to compile Stockfish with JNI
  4. Create an empty Android project. Send the engine isready. Do you get anything back from Stockfish?

Stockfish is written in C++, so in order to call it from your Android app (which I presume is written in Java), you need to call its library via JNI (Java Native Interface). This is a rather technical task better suited for Stack Overflow; here is a question to get started.

If you encounter specific problems while doing this, you can ask a question there; in it's current form it is way too broad. Afterwards, you might need to find out which methods to call (e.g. to evaluate a certain position, or to suggest the best move). That's something we'd be able to answer here, provided that you have a very specific question.

  • Um.. I want guidline How to use library eg. Google provide how to use google map, Blutooth lib... Please give me basic guidline
    – 조남진
    Dec 4 '16 at 5:02
  • Do you give me engine Importing - guidline?
    – 조남진
    Dec 4 '16 at 5:12
  • @조남진 sorry, that would be too long for this format. If you need a step-by-step instruction on how to do this specific task, you will have a very hard time creating a properly functioning mobile app anyway.
    – Glorfindel
    Dec 4 '16 at 13:47
  • @조남진 My answer is the guideline. If you can't follow my suggestions, you are not going to able to do anything.
    – SmallChess
    Dec 4 '16 at 23:59
  • 1
    @StudentT yes, we have it pretty much covered between our two answers. If that doesn't help the OP, I'm voting to close as too broad.
    – Glorfindel
    Dec 5 '16 at 10:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.