Quote Originally Posted by pstudio View Post
Well I don't know if I would call it complicated. It depends on what socket libraries are available. Personally I use Oxygene for Java so that is quite easy, but I haven't used FPC or Delphi in a long time, so I don't know what kind of support they have.
Yes it is possible to use readln and writeln. As I see it, it really depends on what sort of data you want to send and how good a socket library you have available. But I suppose it would be nice debug feature, if a bots console output could be shown during testing. In the end, it depends on who is making the game and what that person prefers. IMO that person would also have to provide a template for each pascal dialect, so that contestants don't have to write the functions for communication with the server, but they only have to focus on writing the ai. Ideally the would only need to implement one method:
Code:
procedure TBot.DoMove(FGame: TGameMetrics);
begin
...
SendCommand(...);
end;
There are some complications, and you hint a bit about some of them: A common, portable interface has to be written if there isn't one already. And it has to be suitable for the problem.

But the big complications are in setup and performance. I would say that performance is the biggest issue. If my client runs from my computer and connects to a common server, how do we know that the competition is fair? What if I get a different netlag than others? If the game is turn-based that is not quite as much a problem, except if the game gives up on a slow connection and ignores its commands because they are too late.