Skip to content

GuyLeib/Rumor_Spreading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rumor_Spreading

This program is a GUI implemenation of Game of Life - Rumor spreading variation. In this variation there is 100*100 grid which simulate a human population.

The colored cells represent the humans, and the four colors represent 4 doubt levels:

S1 - believe every rumor they hear. (colored in purple)

S2 - will believe a rumor in a probability of 1/3. (colored in light-blue)

S3 - will believe a rumor in a probability of 2/3. (colored in green)

S4 - don't believe to any rumor. (colored in yellow)

Using The Program:

  1. Run the "rumor_spreading.py" file or just double click on the rumor_spreading.exe file.
  2. A welcome screen will appear: On the screen you can see the current game configuration, which you can either change using the change configuration button or start play with the current configurations.

image

3. In order to start playing press the "Strat Game" button and the next screen will apear:

image

4.To start spreading the rumor you need to assign the first person who knows the rumor, this will be done using the start button. image

The first spreader will be marked in black as follows: image

Then, you can either spread the rumor one generation at a time using the Next Generation button image or you can skip 30 Generations forward using the 30 Generations Forward button image As the rumor starts to spread, a section appears at the bottom of the board, showing the current generation,the number of people who have heard it and the corresponding percentage: image

All the cells which heard the rumor will be colored in black for the rest of the simulation.

Changing Configuraion:

  1. In order to change configuration run the program and press on "change configuraion" in the opening screen.
  2. The next screen will appear:

image

The "game strategy" parameter determines how the individuals with varying doubt levels are organized on the board. For instance, in the "fast" configuration, the cells are arranged in such a way that those with a lot of neighbors are assigned to the s1 doubtness level.

  1. The valid values for each parmeter is written in the parentheses. You can also change just some of the parameters and the rest of them will remain as the default values. After inserting the parametes you want to change press on "submit".
  2. In case that the inserted parmeters that are invalid a warning messegae will appear (after pressing on "submit") and the configuration will remain in the default parameters: image

Additional Files:

  1. "statistics.py"-The "statistics.py" file is designed to analyze and gain insights into the dynamics of rumor spreading. This file contains several functions that can run simulations with different sets of parameters and plot various graphs to visualize the impact of each parameter on the rate of rumor spreading.
  2. "data.csv"- During the different simulations, a "data.csv" file was created in order to facilitate the organization of data and the creation of various plots.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages