1

I am currently working on a Python 3 API/wrapper for GNU Chess. I've been doing a bit of research and I am pretty much stuck at the moment.

There is the Chess Engine Communication Protocol, but I am not sure if that's the path I should go down. There are also Internet Chess Servers, but again I am unsure if that's what I should be looking into. There is also the Portable Game Notation, but that looks like it's made for human consumption and not computers.

So what is the best way to interact with GNU Chess? Should I create a subprocess to interact with it/parse it's output? Is that the best way to go?

This is an example of me making the opening move in GNU Chess: 3]

kuwze
  • 411
  • 4
  • 13
  • 1
    We can't tell you how to code your program, not to mention the fact that this is primarily opinion-based. I'd vote to close if I had enough rep. – caird coinheringaahing Sep 26 '17 at 15:06
  • I'm wondering what the best way to interact with this program is. I guess it is opinion based, but what's wrong with asking for a suggestion? – kuwze Sep 26 '17 at 15:10
  • From documentation at it is indeed a bit hard to figure how subprocess call should like. But for python chess, can can make you feel satisfied? – Evgeny Sep 26 '17 at 15:15

2 Answers2

1

You need to be more specific in your request. Have you tried anything? Do you have any existing code?

I for myself would certainly explore the Chess Engine Communication Protocol if this is the official API to interact with GNU Chess. If there is an official API to interact with some software, this is usually the best way to go.

transient_loop
  • 5,984
  • 15
  • 58
  • 117
  • ```if this is the official API``` - there is link provided in question and it says nothing of API calls. – Evgeny Sep 26 '17 at 15:20
0

The Chess Engine protocol link you have in your question is the key to your question. You'll need to study the protocol to parse outputs and send inputs to GNUChess.

ABCD
  • 7,914
  • 9
  • 54
  • 90