Player names in state files (for the visualizers)

Just wondering - could we maybe get the player names in the state files?
This will have 0 impact on the actual bots, but will help the guys writing visualizers to slap some names on the bots.

Maybe just in the GlobalState.json files, and not the files actually provided to bots during the game.

Otherwise everyone will have to change their bot nicknames each round to stop people tailoring strategies to different opponents. Not sure if there will be benefit worth the effort to doing this, but I think the fact that bots don’t know who their opponents are is good, just in case.

1 Like

Though the bot nicknames are on the A and B directories right next to the GlobalState.json file, so maybe visualisers can just read them from there?

Well I guess if you make the assumption that player ID “1” is player “A” and “2” is “B”, then it yeah, you can parse the name from the folder

Hi @demaniak

Short answer, visualizers parsed it from the match’s csv files in the past. Its not perfect, it requires some regex or substring to get the name. We plan on improving this with the player and bot name, and other bot.json details.

So the json that we see in a round’s state.json file, is actually created by the game-engine, which only gets bot commands to process a round. It doesn’t receive info like the bot’s name, so therefor that info is lacking in the json files. But the game-runner has that info (like bot/player names), which we use to write the folder names and csv files. I believe it should be in the csv file, or maybe even a dedicated file in each match which will look the same each year?

What are your thoughts on where the player names would be easiest to use for visualizers?

1 Like

Cool.

I’ve set aside my own visualizer ideas for now (since a couple of persons had already made some good options available to the community).
The people who have built visualizers already are probably in a better position to comment than me.

That said - if I was building one, I would be fine to scrape bot names from specific known file names (the CSV files for example)… The only thing that irks me in that scenario is the implicit mapping of “A” to presumably “1” to link the name to the playerId.
My paranoid side is however complaining that there are strange ways that can break - think for example what characters are allowed in bot names currently, and what is legal for file names on whatever file system that file will reside in. And then of course case-sensitive vs case-insensitive…
Otherwise I was thinking it could be included in the GlobalState.json for each round, assuming the names are available to that producer.

Either way, I would definitely rate this very low priority, since there IS a way to get a name to slap on a nice display.

Thanks for the response either way @pierre.roux!

1 Like