-
Notifications
You must be signed in to change notification settings - Fork 37
Possibility to identify bot from Process to Tick #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@SirStone |
I will definitely go for your suggestion 2:
I want to keep the necessary logic at the bot side to a bare minimum. |
I have now made the implementation with release 0.17.1, so the Booter provides the boot-id, and the Server the session-id (and battle id). The bot-list-update provides info about the bots via the bot-info schema, which extends the bot-handshake that now contains the @SirStone: I hope this is useful for you? 🙂 |
Nope, this is not improving anything for me, but only because I'm not using the booter at all! If I do I lose the stdout and stderr messages from the bot. If you tell me that I missed te fact that from the booter I can get the messages written by the bot I will rewrite part of the code to use the booter again but today I have to run the bots myself in order to get the output, and doing so the "BotListUpdate" does not contain any PID becasue the is the booter prividing it. The bots themselves can read their pids but I've read a bit and looks like would be problematic because is platform dependant, not mentioning that you are providing the libraries in 2 languages already. What about getting the output of the bots from the booter in some way? |
@SirStone Talking about PIDs, there is actually two levels:
The It is possible to get the PID from the Bot API with both Java and .Net (I have tested this out). But it might not be available for other languages and environments. But it is still hard to send this PID back to the booter. So perhaps we need to think of another solution for fixing your issue? One idea I have in mind is... that we use the session id for everything and drop the pid and boot id entirely. Do you think this will be a solution that will fix the issue? |
You are right, the Bots API must keep the freedom to be made in many and many different langages. I'm thinking to drop this search for a solution from the game, you already solved 50% of the problem introducing the session_id. A(pid) --x--> B(nothing) --x--> C(id) I have in mind to solve the from A to B with a custom solution in my software, basically when I boot the bots, instead of launching them right away I put them in a "launching queue", the next bot can be lunched only when the previous one joined the server and receiving the session_id or failed. In this way I can get the PID from the booted bot and the "newest session_id" got from the BotUpdateList will be matched to the PID of the latest launched bot. I just need to put this in code and test. |
@SirStone If the |
@flemming-n-larsen killi it! I never liked it since beginning, It won't be missed 😎 |
OK. I will kill it. 😂 |
I guess release 0.17.3 wraps up the stuff we agreed on for this issue. Hence, I will close the issue. Please create a new one, if there are still things to fix in this area. |
Is your feature request related to a problem? Please describe.
As I described in this discussion I'm developing an alternative graphic client for roboocode Tankroyale, focused on my needs.
The application runs the bots, the server and the controller. My problem is to match the runned robots from process with the bots competing into the battlefield but with the situation nowday looks like is impossiible with 100% accuracy. Here's why:
The bot is identified in 3 different ways not linkable to each other if not with guesses.
Assuming that my web application can correctly come in possession of all PIDs, Session IDs and in-battle IDs, right now it hasn't the possibility to connect the bots in these three lists together.
If not clear enough I've put, at the end of the request, a simulated example of situation where the matching is impossible.
Describe the solution you'd like
I think that the simpler and easier solution (and so the best) is to add to the BotListUpdate message, as middlepoint between the new bot and the battle, two fields: the PID of the bot (given by the bot itself during the handshake) and the id of the battle, pre-issued by the server that will later use as ids for the battle.
In this way the botlistupdate bot object would contain: name, sid, host, port, pid, battle id. With this combination of data every program will be able to discern what a bot is doing in every level of the software without confusion.
ps: I approve the usage of short ID for the battle, means less data to transfer for every tick and the ticks are spammed like hell during the battle, keeping those smallest as possible is mandatory.
Describe alternatives you've considered
Alternatives I like less
Additional context
simulated example, where the data has the same content is written in italic:
In this example, where the 3 bots have the same name and same host, is impossible to match the 3 same bots in the 3 lists among each other. Not even the Controller itself can match the bots in the list given within the TicksEventForObserver with the ones given in the BotListUpdate.
Thanks for reading this far
The text was updated successfully, but these errors were encountered: