1

I have developed a chess engine in Python with negamax, alpha beta and piece square table. I want to "compile" my code into a UCI compatible one so I can load it to Arena GUI, but I have no idea at all how to do that and every time I search for information I found it very confusing and counterintuitive. Could someone give me a light, a direction please, cause I don't know how to even begin ...

Note: I use Python chess module in my code and the moves are returned in UCI format since I use the return move.uci() method, but I don't understand if this is enough or how to load my code to Arena GUI, I have just few experience developing.

Glorfindel
  • 24,745
  • 6
  • 67
  • 114
Felipe L
  • 21
  • 1
  • 5
    Did you read the [uci protocol?](https://github.com/fsmosca/UCIChessEngineProtocol) – ferdy Aug 14 '22 at 12:35
  • 5
    Put simply, your engine needs to write certain information to standard output, which the GUI will read, and you need to read certain information the GUI will send via standard input. What this "certain information" is is specified in the UCI protocol Ferdy linked. – Christian Dean Aug 14 '22 at 16:05
  • 4
    Probably a look at [Sunfish](https://github.com/thomasahle/sunfish) uci.py file would be of help. – emdio Aug 14 '22 at 19:36
  • I believe the tricky part is that the engine must always listen for input even when thinking. – qwr Aug 22 '22 at 03:45

1 Answers1

1

I once posted a simple code example on Stack Overflow. This may help. There they also mention the python-chess package, but that does not support the full set of UCI commands.

Nils Lindemann
  • 1,005
  • 5
  • 8