Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toch/zombie_epidemic
This is an Agent Based Model simulator of the Zombie Disease.
https://github.com/toch/zombie_epidemic
Last synced: 23 days ago
JSON representation
This is an Agent Based Model simulator of the Zombie Disease.
- Host: GitHub
- URL: https://github.com/toch/zombie_epidemic
- Owner: toch
- License: mit
- Created: 2015-01-03T13:24:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T15:48:17.000Z (over 7 years ago)
- Last Synced: 2024-10-10T17:21:21.195Z (about 1 month ago)
- Language: Ruby
- Size: 38.1 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Zombie Epidemic
This is an Agent Based Model simulator of the Zombie Disease.
## Examples
Below two results obtained with the simulator.
Legend:* green: healthy human
* yellow: infected human
* red: zombie
* black: killed human or zombie![Human wins!](https://raw.githubusercontent.com/toch/parisrb-150106/master/images/zombie_epidemic_1420498864.gif)
![Zombie wins!](https://raw.githubusercontent.com/toch/parisrb-150106/master/images/zombie_epidemic_1420500631.gif)I've [presented the simulator first at Paris.rb Jan 2015](https://rawgit.com/toch/parisrb-150106/master/presentation.html).
## Installation
Install it yourself as:
```
$ gem install zombie_epidemic
```## Usage
### Run the simulation
With the default parameters, you just type:
```
zombie_epidemic
```It will store the results as PNG files into the current directory.
### Build the movie from the PNG sequences
```
zombie_epidemic movie
```## The Model
### Space
The space is a discrete 2D bounded map. Each point `(x, y)` is a square that
could be occupied by an agent or an obstacle.### Time
The time is discrete. Each time step represents enough time for a normal action,
such as a step. It is about 0.5 second.### An Agent
An agent is a person charactherized by the following:
* a position, and
* a health state.Every time step, an agent can:
* walk,
* attack, or
* stay.Without any cost, an agent perceive:
* his surrounding (obstacles, position of agents), and
* neighbors' status (zombie or not)The quality of the perceptions and actions are altered by the health state:
a zombie doesn't perceive well, neither it walks well.### The health state
The disease model SIZX is implemented as the following state transition machine:
```
S -------> I -------> Z -------> X
| | ^
| |---------------------|
|--------------------------------|
```## TODO
* other characteristics (e.g. energy level)
* other actions
* other perceptions
* load custom map
* custom strategy## Contributing
1. Fork it ( https://github.com/toch/zombie_epidemic/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request