Inspiration
As the world faces this pandemic situation there is a sudden need to understand how this disease spreads and what are the measures which could possibly stop or slow down the spread so that the authorities have enough time to take countermeasures.
The best way to do so is to simulate the situation, understand the reasons, and try out different ways to tackle the situation.
What it does
Cosim City is a simulation of how a human to human transmission of disease happens and how can we reduce the rate of transmission through simulation and experimental studies!
Starting a total of 1000 people and with a less than 5 unknown infected, they start moving to their destinations and have a possibility to get others infected on their way if they are close enough to an infected one!
These newly infected ones can also infect others while moving! Also, these transmissions have randomness to keep things real.
To keep a track of the infected patients we have a real-time graph as well as the counter showing the rate of infection and the current count! You can speed up the simulation up to 4 scales to get things faster.
Also, you can switch between different camera views to have better looks at these movements! You can pinch and swipe to change angle! You can set your camera to follow a random infected person! And as an experiment, you can add a mask to all people which actually reduces the radius of infection!
How I built it
The project is build using the Unity3D game engine with all the code/scripts in C#.
Started with the basic shapes of players A capsule, 2 spheres for eyes, and a lovely cowboy hat.
Wrote a script to spawn houses at the base at equal distances to start with the city.
With the help of Navmesh generated, the player could walk on the surface avoiding obstacles.
With Capsules colliders, we can check if two or more people were close enough to get infected by one another, each player then checks if the other one is infected and then it might change itself to infected (Low possibility- 20-30%) - PlayerController.cs
On any change in infected status, it is informed to the graph script through an event and thus the current infected count is increased.
Challenges I ran into
Few of the challenges were:-
To increase the sample size of the simulation and yet not to affect the performance so as to keep it mobile-friendly, thus used a simple geometry of a capsule for the player shape
To trigger the infection with two conditions that the people are close enough while passing by and the other one is already infected. Over this to add a probability of about 15-25% infection in the above case.
To keep the track of infected patients in real-time and keep the graph as well as counter updated with the number up there.
Accomplishments that I'm proud of
Creating such an wide idea and implementing it in such a limited time was a big task, and I am proud to have done it partially.
What's next for Cosim City
We are planning to expand this project after this hackathon to add additional experimentations and see changes in the graph
Adding a feature to quarantine the infected patients after a certain duration to analyze its effect on the graph
To revive them from the infection and turn green in a few days and analyze the graph.
To add social distancing rules in the city and analyze its effect on the graph.
To introduce a vaccine for a small section and analyze the effect of group immunity.
Possibilities are endless and we are open to more such ideas!


Log in or sign up for Devpost to join the conversation.