Creating a program compatible with others

Sorry for all the questions recently… I’m getting stuck on some of these more difficult topics. :astonished:

How can I make a program which can accept correctly formatted input from other programs and communicate things to those programs? For example, how can I make a chess board where I can then write a separate file, in say C++ Java which obtains the board positions from the GameDevelop program, calculates a move and then gives the move to the board on GameDevelop for it to be made? I really have no idea on how to start…

Create a xml file, write your variables inside, then force your second software to read a “LastUpdated”. If different than the one already stored, it means the file has been updated. In that case, read its content and update the second application.

This seems like a very inefficient way of doing it though. For instance, if I’m playing go, I have to open the XML file, write a board position for 19 * 19 = 361 squares, plus an evaluation for each square (361 integers), then my other program opens up the XML file, reads 361 squares, plus the 361 evaluations, updates the new evaluation and board position and then the GD program opens up the XML file and makes the necessary changes.
That’s a lot of writing to XML files! And it will surely be very slow. Is there not a better way?

I’m not an expert in go, but :

Write an xml file containing :

The appli2 will read the file. If the pawn number zzz is not at the written coordinates, then move it to them.

All that matter is the last move, not the position of all the pawns.