Skip to main content

No project description provided

Project description

cuckoo-sim

Agent-based simulation of cuckoo brood parasitism — modeling the co-evolutionary arms race between cuckoo parasites and their reed warbler host species. Tracks population dynamics, egg-laying strategies, and host detection abilities over many generations.

Installation

pip install cuckoo-sim

Or install from source in editable mode:

git clone <repo-url>
cd Data_And_Script/Model_Script
pip install -e .

Quick Start

GUI

cuckoo-gui

Opens a Tkinter interface with two tabs:

  • Configure & Run — set input CSVs, population parameters, spatial grid, and run simulations
  • Results — plot population time series, trait evolution, and spatial maps

CLI

cuckoo-sim -c path/to/Cuckoo/ -r path/to/Reeds/ -o path/to/OUT/ \
  -c1 Cuckoo_12.csv -r1 ReedsBird_1.csv -q a -N 300 -M 10

Key arguments:

Flag Description Default
-N Number of simulated years 300
-M Number of iterations 10
-P Crowding penalty coefficient 0.9
-D Detection cost on breeding 0.15
-pm Penalty mode (exponential / logistic) exponential
-gw, -gh Spatial grid width/height 200
-s1..-s4 Sigma values for trait variation 0.02 / 1.0

Python API

from cuckoo_sim import SimConfig, run_simulation, aggregate_time_series

config = SimConfig(
    cuckoo_file="path/to/Cuckoo_12.csv",
    reeds_file="path/to/ReedsBird_1.csv",
    years=100,
    iterations=5,
    grid_width=100,
    grid_height=100,
)

results = run_simulation(config)
agg = aggregate_time_series(results)

for species, data in agg.items():
    print(f"{species}: final mean pop = {data['Total']['mean'][-1]:.0f}")

Citation

If you use this software in your research, please cite:

Wang, W., Van Deelen, T., Wei, F., Li, S., & Wang, L. (2025). Anthropogenic habitat loss and fragmentation may alter coevolutionary progress as examined in a brood parasitism model. Ecology and Evolution, 15(7), e71721.

@article{wang2025anthropogenic,
  title={Anthropogenic Habitat Loss and Fragmentation May Alter Coevolutionary Progress as Examined in a Brood Parasitism Model},
  author={Wang, Wei and Van Deelen, Timothy and Wei, Fuwen and Li, Sheng and Wang, Luping},
  journal={Ecology and Evolution},
  volume={15},
  number={7},
  pages={e71721},
  year={2025},
  publisher={Wiley Online Library}
}

Dependencies

Python 3.6+, numpy, scipy, matplotlib, tkinter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuckoo_sim-0.1.2.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cuckoo_sim-0.1.2-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

Details for the file cuckoo_sim-0.1.2.tar.gz.

File metadata

  • Download URL: cuckoo_sim-0.1.2.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for cuckoo_sim-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1c1d330a97ec09c151d30c98a5d2d4f7e6da91f00c34d35f53c9f79fcab5cd43
MD5 43af958b506e871b14a1b2077194a2ba
BLAKE2b-256 bf6e3978a50297cf04ce24209c7a6435c6858230c7a1e36addd8f7fb547791e6

See more details on using hashes here.

File details

Details for the file cuckoo_sim-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cuckoo_sim-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 49.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for cuckoo_sim-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1504302954ba9877d91876d0256a79ca784e1e978da29d852d6c374ebd954b4
MD5 a6120bdf0f8945197af7606a70a7f052
BLAKE2b-256 9ee118f2a39e29ecbc8fc931a885da9a1a2a3d8629398df55833d007c9b5790c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page