Skip to content

tobiasraidl/agent_based_opinion_sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Based Opinion Model

Random, grid and network structured agent based opinion models plot

Setup

pip install mesa
pip install seaborn
pip install numpy
pip install pandas

Run

Run the server.py file
python server.py
Once the server started, a new browser tab should open. Click "Start" on the top right. Each 100 steps a line plot will pop up displaying a lineplot of the agents opinions. Depending on SPACE_TYPE which you can select in the params.yaml, other plots may additionally pop up. The simulation will hault while plots are actively displayed and continue once closed.

Checkout the params.yaml to not only set desired model parameters but also any other simulation configurations.

TODO

  • Implement logic for agents to not move on occupied fields
  • Implement logic for agent initialization to only get placed on unoccupied cells
  • Implement easy switch between random and grid version (boolean in param.yaml?)
  • Better color scheme for grid representation
  • Implement logic for agent meetups in grid version
  • Implement network version
  • Make initial opinion distribution gaussian
  • Play around with different initial agent position distributions on the grid (e.g.: simulate crowds/cities as clusters)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages