paint-brush
Gossip Simulation Implemented In Pythonby@mcmurchie
1,496 reads
1,496 reads

Gossip Simulation Implemented In Python

by McMurchieMay 18th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Anthropologists have long debated the value of story-telling and collective belief in success of the human race - surely gossip is a big part of this? The Digital GossipMonger is a game of sorts. In this game/simulation there are residents who partake in the occasional gossip. They are just rules based bots who go about their day. The Sim comes with interactive terminal and generates Json,CSV and Parquet reports. Gossips will be associated to citizens who spread or create it. Citizens can only create or share rumours when near other people. They only access interfaces I let them including their internal references.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Gossip Simulation Implemented In Python
McMurchie HackerNoon profile picture

Recently whilst struggling to fall asleep, I had a bizarre idea; how important is gossip to our species and our evolution? Anthropologists have long debated the value of story-telling and collective belief in success of the human race - surely gossip is a big part of this?

Celestus: The Gossip Town

As such, i've decided to build a game of sorts, in this game/simulation there are residents who partake in the occasional gossip. They are just rules based bots who go about their day.

Now enter the Digital GossipMonger: AI entities optimised to keep gossip going, spread it as far and wide as possible or gain status by generating unique rumours.

Image: The Sim comes with interactive terminal and generates Json,CSV and Parquet reports.

To get the ball rolling I had to think high level and develop a set of rules, from which I could build on.

  • The environment has a time engine.
  • Gossip can be created
  • Gossip can be positive or negative (in terms of impact to target)
  • Gossip can be about one or multiple targets. Even about no targets.
  • Gossip has an associated risk.
  • Gossip has a shelf-life/popularity (value decreases to 0)
  • Gossips will be associated to citizens who spread or create it.
  • Citizens can only create or share rumours when near other people
  • Citizens age and die
  • Citizens (normally) want more status points
  • Creating gossips gain you status points or removes some

and finally...

  • Citizens get old and die 😭

These rules were only the foundations that allowed me to build all the functions, thanks to the help of sociologists friends and some research i've been able to embed all these rules and a lot more into playbook templates, each of which map to a given psychology/sociology framework.

This means we can run the simulation over and over again, to see how the world evolves under different academic assumptions. The key is not to make any assumptions myself, but to code as much flexibility to iterate through all the possible sociological frameworks to compare, validate and learn.

Integrating AI models and make sure they behave

one of the key reasons for building two engines in one project [Data Oriented System (DOS) and Game Like System (GLS)] , is so that the AI models can integrate through the terminal DOS interface - this allows them to operate at CPU speed. Of course doesn't let us humans get in the middle of the training process (other than setting breakpoints at certain iterations in the loops to allow value tweaking).

Once the models are trained, (Rnn, Genetic, Random Forrest etc), they can be deployed on the game platform and run at human speeds so I can interact with them and see how things evolve at a more manageable pace.

A big challenge to all this isn't the models themselves, but ensuring they behave and don't have access to data that would allow them to cheat. For example let's say there is a rumour about Jim, three other people know the rumour, let's call them Sarah, Bob and Dave. Jim doesn't know who started the rumour, but me (Adam, a real person) has to track the original creator of the rumour. I track it in a gossip Database, Sarah Bob and Dave are rules based bots so they only access the interfaces I let them including their internal references. If however Jim was an AI, even if I restrict his access to the gossip Database he might be able to infer the original gossip source via relationships in the data, especially if it's leaky and designed poorly.

It's all about Status....and other things

You might be thinking, what is it then that drives these agents? Or if you are more experienced in AI litterature you might ask 'how are you managing and defining value?'.

The answer isn't straight forward, so here is a list:

  1. Lets try various value permutations (in addition to framework permutations), see what sticks and resembles real life.
  2. Stacked Categorical Coding: In real life we have many motivators, money, health, popularity. I've encoded this into a single value - status. I'm open to adding in more mechanisms, but I spent a lot of time calculating the value contributions, in this case I think merged encoding is efficient and simple.
  3. AI optimisers are being trained on various catagories and results documented, at the moment the main ones are personal status, spread count, gossip longevity and unsupervised exploration.

But why tho?

At the risk of sounding wishy washy, it's fair to say we have already transitioned from humans can hack machines to machines can hack humans.

Social media news feeds, click-bait marketing and soon (I think) GPT3 powered telephone manipulation of unsuspecting victims have direct impact on our well being.

More importantly they take advantage of the evolutionary blind spots in our reasoning and logic. Usually this is done via an subtle manipulation of our internalised social framework (i.e. adverts disguised as news articles about someone you respect). A near future scenario could include overseas call center bots impersonating the voice of a close relative asking for money.

Even if this is blown out of proportion, by simulating societal mechanisms, producing synthetic and hybrid data it might be possible to shine a spotlight on our specific social mechanisms that get abused and possibly even develop counter-measures.

If that's all sounds a bit pie in the sky, then what I can say is, it's fun! By having zoom calls with my friends with sociology, psychology and marketing backgrounds i've been able to brainstorm, refine ideas and help bring together different disciplines to hopefully synthesize something of value.

So far the entire project has been coded up by me - but it's all open source, please reach out to me if you want to be part of this. Alternatively if you want to build on top of the platform you can fork the repo and reach out to me for Dev notes. https://github.com/murchie85/gossipSimulator

Thanks for reading!