I want to arrange an AI contest between some friends. Lets say tic tac toe, each player program a method which get the board and a symbol(X\O) and return the place which he want to play at his turn. Now my problem its how to "connect" two AI's in another program so I can test all users and see who has the best code. The only way I think of is to communicate with a text file - all the AI's have thread running on background and check changes on the text file,the engine summary the game details(which turn,the board,score,players) to the text file.
How can this can be done better? And one more little thing, this is common to have a time frame for each turn in AI contests? (Because the AI program will run in different times on different computers)