3

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.

closed as too broad by Glorfindel, SmallChess, user1583209, GloriaVictis, Maxwell86 Dec 6 '16 at 19:18

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

2

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
2

@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?

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