I am building a chess playing robot, so after getting an 8x8 matrix of 1's and 0's from the reed switch sensors, how do I convert this matrix to a FEN string so that I can send this to the Stockfish engine?
Also, I am having a lot of trouble in writing a Python script that can send the FEN string as input through UCI protocol and get the next best move.
As of now, I don't really care about move validation/checking for check mate/promotion. I just want to get the next move.
I have already gone through a lot of links about UCI protocol/API, Stockfish engine working, and programming with python, etc., but none of them have really helped me out.
I would appreciate anyone's help!