Page 1 of 1

Using the game logs for research

Posted: Sat Jun 30, 2018 1:39 pm
by Palladinium
Hello, semi-frequent player, forum and discord lurker, programmer and computer science PhD student here.
I'm studying procedurally generated narrative, in particular the possibility of using machine learning to extract knowledge and patterns from existing data, to be later used to generate brand new stories.

Why is any of that relevant?
Well, I happened to really get into the game as I was writing my research proposal, and once I learned that the game has publicly available game logs I thought they'd make for an... interesting source of data.
Jokes aside, the game is heavily player-driven, with deception and hidden knowledge as core mechanics, crazy enough storytelling while still constrained by mostly consistent game logic, and plentiful game logs with more being produced every day. It's just what I need from data at this point.

Now, I have some questions. I'm not sure if this is the right subforum to be asking them in, but it's my best guess.

First off, I couldn't find anything about using the logs for matters outside of the game and ban appeals. Given that they are publicly available to anyone, would it be alright for me to use them for research purposes?
They are already cleared of IP addresses, and I'd be happy to anonymize or remove any further identifying information (ooc chat, character names, usernames) if need be.

Secondly, if I am able to use the game logs, I'd be looking to contribute to the codebase to make future logs more complete, since the more data I have the better for me, and the logs in their current form are missing most interactions between players and the environment. As a side effect, more thorough logs would probably make admin-related matters easier, and I'd love to give something back to the game that consumed many of my sleepless nights.
Would a PR that adds logging to a whole bunch of game actions be well received? Or are the logs as sparse as they are now for a reason?

Last but not least, cheers to all the coders, admins, players and everyone else that made this game the amazingly weird thing it is.

Re: Using the game logs for research

Posted: Sat Jun 30, 2018 1:45 pm
by Dax Dupont
You're more than free to use logs for anything you want.

As for adding logging, only add logs for things that are needed for admin purposes, too much information can drown stuff out.

We have all kinds of statistics that gets collected into the database though, atlantaned's statbus uses them. Sadly this is not all public information.

Re: Using the game logs for research

Posted: Sat Jun 30, 2018 2:41 pm
by Nabski
I feel like logging for the sake of informational logging in a separate place could be interesting. Really the one to take this up with would be MSO, but good luck on your PhD!

A friend that does machine learning type stuff for his work was interested in building a system that decides if it should answer door requests or not on what previous AI had done, but it turned out doors were not logged so OH WELL.

Re: Using the game logs for research

Posted: Sat Jun 30, 2018 5:13 pm
by Dax Dupont
Nabski wrote:I feel like logging for the sake of informational logging in a separate place could be interesting. Really the one to take this up with would be MSO, but good luck on your PhD!

A friend that does machine learning type stuff for his work was interested in building a system that decides if it should answer door requests or not on what previous AI had done, but it turned out doors were not logged so OH WELL.
Problem is that a month logs for a single server already take up between 1 to 2 GB and we don't want to drown useful information in pool of shit that will not be used for admin stuff effort.
Image

Re: Using the game logs for research

Posted: Sat Jun 30, 2018 6:31 pm
by MrStonedOne
hit advance, then hit compress

Wait an hour

come back

bam, 400mb size on disk.

This is all of sybil's logs (original format)
Image

Re: Using the game logs for research

Posted: Sat Jun 30, 2018 8:22 pm
by Alipheese
Actually adding logs of where someone is when they say something added to their say logs would be amazing. During my adminship i came accross multiple situations which someone had said a threat but with zero clue as to where it was due to being unable to know where they said it.

Re: Using the game logs for research

Posted: Sun Jul 01, 2018 2:42 am
by Palladinium
I think that unless storage (cost) is a concern, most kinds of logging would still be helpful as it's pretty easy to write a webapp to filter through the logs. Yes, I'm volunteering to write it if it'll allow for more logging statements to get into the game.
It doesn't even need to be able to parse them, just take strings and match them to lines, and it'd already be heaps better than good old ctrl-f through a big text file.
Still, there is such a thing as too much logging.

Here's what I was considering adding, roughly in order of importance:
  1. Full area names. Currently most log lines only have (x,y,z) coordinates (some not even that), which are really inadequate, as Alipheese pointed out.
  2. Proper logging of radio channels. I couldn't find anything about radio channels in the logs. The statbus has a tally of how many messages are sent through each channel, but I have no idea of how that's extracted.
  3. Item pickups/drops/moving. This would produce a lot of lines. Perhaps restricted to certain categories of items (high-risk, weapons, IDs, antag items).
  4. Door opening. Like items, this would generate a ton of lines. Not yet sure how to get around that.

Re: Using the game logs for research

Posted: Sun Jul 01, 2018 3:11 am
by MrStonedOne
Most of statbus is from the feedback system. its a way to store meta info and metrics about a round in the database as json blobs.

One idea I had was to have rounds save the over all feedback json blob to the logs as well, as currently its stored in the database, and I can't public grant access, even read only access, as there is no way to do that with opening up to some obvious ddos issues.

Re: Using the game logs for research

Posted: Sun Jul 01, 2018 4:08 am
by bandit
shit you could probably get a lot of data just from poly's logs

https://twitter.com/Poly_the_Parrot

Re: Using the game logs for research

Posted: Sun Jul 01, 2018 4:58 am
by Dax Dupont
MrStonedOne wrote:Most of statbus is from the feedback system. its a way to store meta info and metrics about a round in the database as json blobs.

One idea I had was to have rounds save the over all feedback json blob to the logs as well, as currently its stored in the database, and I can't public grant access, even read only access, as there is no way to do that with opening up to some obvious ddos issues.
I've been meaning to ask if it was possible to get an occasional database dumb that's sanitized from sensitive data.
Not just stats but things like books and such too.

Re: Using the game logs for research

Posted: Sun Jul 01, 2018 4:59 am
by Dax Dupont
bandit wrote:shit you could probably get a lot of data just from poly's logs

https://twitter.com/Poly_the_Parrot
There's a json file in the public logs for this, I use it inside other things too.

Re: Using the game logs for research

Posted: Wed Jul 04, 2018 4:27 am
by Dr_bee
If you do use the game logs for research please post the resulting work from it to the forums. I am not a computer scientist, but reading work from other fields is always fun to do, even if I most likely would not understand it completely.

Re: Using the game logs for research

Posted: Fri Jul 06, 2018 4:23 pm
by Atlanta-Ned
Poly is at https://tgstation13.org/parsed-logs/syb ... /Poly.json, change the server name in the URL to get the other servers if you want.

In regards to your PM, sure. Hit me up on discord if you have any questions.