mesa / mesa/mesa-examples

Updates and Fixes to Epstein Civil Violence Model

Open
#41 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
252
Forks
279
Avg merge
8d 9h
Merged PRs (30d)
2

Description

This is my first public repository issue/pull request. I had mentioned I made these changes a few months ago, but haven't had time until now after the school year is over to clean it up and organize it for a pull request.

These changes fix the lack of cyclical explosions in Citizen agent behavior in the mesa Epstein Civil Violence model with a few tweaks.

Bug Fixes
- Fix agent state logic
- Fix Moore vs Von Neuman neighborhood selection to use Epstein paper behavior
- Fix agent vision bug (was 1 and not parameter `vision` when calculating neighborhood, which also fixes agent movement issue)
- Fix arrestee state issue (arrestee was not being reset to "Quiescent", and so was counting as "Active" for all nearby agents)

Additions and Changes
- add model attributes to count agents and display a graph of agent states
- Change display of agents where jailed agents are represented by grey square box
- Added sliders for model attributes

Contributor guide

Open the contributing guide

Research direction

Start by locating the Epstein Civil Violence model and its agent behavior, then inspect how neighborhood selection, vision, movement, and arrestee state are handled. Review the model display and controls for the requested agent counts, state graph, jailed-agent styling, and sliders; done means the listed behavior fixes and display additions work together.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.