Code Monkey home page Code Monkey logo

sir-model's Introduction

SIR Model

This project was a university group project carried out by David Ferneding, Nils Neukirch, and Florian Pöhler. The original goal was to create a SIR model as a multi-agent system. We actually extended this model to a SEIR model, and then even further to allow individuals to have five different states: Susceptible, Exposed, Infectious, Symptomatic, and Recovered. Then we use the ML-Agents framework to train our citizens to try to not get infected.

The code is currently still a bit messy, sorry. It allows us to play around with it and see interesting results though.

Getting Started

This project can't be run (yet), so to see it in action or develop it further, there are some prerequisites.

Prerequisites

  • Unity
  • ML-Agents
    • The Unity package is included as a submodule at ref/ml-agents
    • The python package is only needed if you want to train your own model

Running a simulation

To run a simulation you need to open either the LearningScene or the GraphScene. Using the GameManager you can adjust some variables like the number of citizens, the infection chance etc. You should then add a model to the CitizenAgent Prefab by changing the model located under Behavior Parameters.

Ideas/Outlook/Todo

The following list represents a collection of ideas that would be interesting to see implemented:

  • Reproduction number R - show R in realtime while running a simulation
  • Infection without contact - allow citizens to infect others while being near them without touching
  • Hotspots
    • Events
    • Supermarkets - visiting once in a specified time period could be mandatory
  • Age - give the citizens an age
  • Medical preconditions - citizens could have some medical issues like diabetes, heart problems etc.
  • Death - citizens have a chance of dieing, could be based on age and/or medical conditions
  • Quarantine - allow citizens to quarantine themselves
  • Standalone application - create a standalone application where the user can change some configurations and run a simulation without needing the unity editor. Development on this has begun, but is on hold and far from finished. See Assets/Scenes/MainScene.unity
  • Regions - add different regions to represent countries. Citizens have a small chance to travel to another region
  • Improve the arena - currently the arena is just a square. This could be improved with buildings, streets etc. to better resemble a city

Authors

License

The project is licensed under the MIT license - see the LICENSE for details.

sir-model's People

Contributors

poehlerflorian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.