4

I am creating a game where the engine and graphics are running on Java, and one of the players which is AI controlled, in Python. I need to setup some communication method between these two, with the following conditions:

  • multi-platform compatible: i am developing on a windows machine, but later i want to run both on Raspibian (RaspberryPi)

  • low delay (milisecond level): the game is based on Pong, so the AI reaction to the ball position must be as fast as possible

  • low throughtput: the throughput can be low, since only some numerical values will be passed, such as field dimentions, ball position and players positions (all serializable objects)

  • full python compatibility: the Python AI program might need to communicate with an AI USB Accelerator like the NVidia Jetson or Google Coral. I haven't worked with these boards yet or their libraries, but i want to be sure that whatever communication solution i choose, also supports the necessary libraries for these boards.

  • Client-Python/Server-Java synchronization: the game (Java) will run on 30 to 60 FPS, while the AI (Python) speed will heavily depend on the implementation, but its likely to be slower then the game.

  • Directionality: the game provides the data, and the AI choses the action, therefore communication must be both ways

  • Easeness of use: the focus of this project is not the communication between languages, therefore i want to make it as transparent and easy to implement as possible.

Given these requirements i found these libraries

I tried to group the libraries according to their working principle. From your experience, and my requirements, what would you say is the library that fits the best?

1 Answer 1

1

After some reading (no test implementation for each of the libraries) it seemed that Pyro is the best choices: more flexible, few setup code, over the network, very mature code, etc. I implemented Pyro in my project and i have to say it works even better then i expect!

So my answer to this post is, go with Pyro.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.