wolf-sheep-grass
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.0%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: knappa
- License: mit
- Language: Python
- Default Branch: main
- Size: 45.9 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
The Wolf-Sheep-Grass model
This is a Python reimplementation of NetLogo's Wolf-Sheep-Grass model https://ccl.northwestern.edu/netlogo/models/WolfSheepPredation
Install via
commandline
pip install -e .
within this directory. (The "editable" -e flag may be omitted if you do not plan on changing the model.)
Typical usage can be viewed in wolves-sheep-grass.py. e.g. the model can be instantiated with parameters:
```python
from wolfsheepgrass import WolfSheepGrassModel
model = WolfSheepGrassModel(
GRIDWIDTH=...,
GRIDHEIGHT=...,
INITWOLVES=...,
WOLFGAINFROMFOOD=...,
WOLFREPRODUCE=...,
INITSHEEP=...,
SHEEPGAINFROMFOOD=...,
SHEEPREPRODUCE=...,
INITGRASSPROPORTION=...,
GRASSREGROWTHTIME=...,
)
``
The model is advanced forward in time usingmodel.timestep(). Classic usage will findmodel.numwolves,model.numsheep, andsum(model.grass)interesting. More advanced usage might look atmodel.grassdirectly which is a 2d boolean array indicating grass presence or one of the agent arrays:
*model.wolfpos/model.sheeppos
*model.wolfdir/model.sheepdir
*model.wolfenergy/model.sheep_energy`
each of which should be masked by the boolean arrays model.wolf_alive or model.sheep_alive.
That is, arrays such as model.wolf_pos are fixed length, (mostly) independent of the number of wolves and contain meaningless entries. To get only the meaningful entries, use model.wolf_pos[model.wolf_alive].
Owner
- Name: Adam Knapp
- Login: knappa
- Kind: user
- Location: Washington, DC
- Company: University of Florida
- Website: http://www.instanton.org
- Repositories: 3
- Profile: https://github.com/knappa
A topologist
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: wolf-sheep-grass
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: "A. C."
family-names: Knapp
email: adam.knapp@medicine.ufl.edu
affiliation: University of Florida
orcid: 'https://orcid.org/0000-0002-5719-6003'
identifiers:
- type: url
value: 'https://github.com/knappa/wolf-sheep-grass'
description: github repository for the WSG model
repository-code: 'https://github.com/knappa/wolf-sheep-grass'
abstract: >-
Python reïmplementation of Netlogo's Wolf-sheep-grass
model of predator-prey dynamics.
license: MIT
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Dependencies
- attrs *
- numpy *