robocode-dev / tank-royale

Git repository for Robocode Tank Royale
Apache License 2.0
132 stars 26 forks source link

Booter to connect to a remote game server #100

Open zoetsekas opened 1 month ago

zoetsekas commented 1 month ago

Is your feature request related to a problem? Please describe. I am trying to create an AI solution that would allow me to play my AI tank agent against OOTB tanks. I have created docker images for each booter, gui, controller, observer, server and, my AI bot. I can instantiate a container for each the gui, controller, observer, server, and my AI bot.

Describe the solution you'd like I would like the booter to connect to a remote game server and boot OOTB tanks. So the AI tank agents plays initially against 1 or more OOTB tanks to gather experience Then the AI bot agent would use a offline RL algo to train and play again with OOTB tanks until it can beat them.

flemming-n-larsen commented 1 month ago

I am happy to hear that you have been able to setup docker images for RTR. 😊👍 I makes perfectly sense to create docker images for the server, GUI, and bots.

When it comes to the booter, its only purpose is to boot up bots running locally. So if you need something to start up bots on a remote server, this this is not a small task, as it would require:

a) An application (service / server) that must be running on the remote machine that can be accessed to list available bots, but also run bot instances. This application would of course make use of the booter to actually boot bots locally.

b) An application that is the "client side" that connects to the application on the remote side, which boots up bots on the remote side.

This is possible to do, but would also involve using some security mechanism like a secret to connect to the remote server etc. And some mechanism to limit how many bots can be started up by the individual client connecting to it.

flemming-n-larsen commented 1 month ago

I have been thinking on something similar, but with a different approach.

Instead of running bots on a remote server, it would be great if people just make their bots sources available on a version control system like GitHub, GitLabs or similar. This way, we only need a URL to a "remote" bot.

The source code for a bot is downloaded with all necessary scripts for running it (similar to the sample bots), and the local booter will be able to run the bots directly, as bots will be compiled automatically when executed. No binaries are involved.

However, we might need some security mechanism in place so the process running a bot does not allow the bot to do evil stuff like deleting files on the file system etc. One way to overcome this would be to run the bots in a restricted container, so it will not harm to host system.