# envinyatartherenewer/ant_life_cycle_simulation_and_ml architecture

> Architecture diagram of the GitHub repository envinyatartherenewer/ant_life_cycle_simulation_and_ml, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml
- Repository: https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml

## Overview

This repository explores ant allele-frequency dynamics and machine-learning analysis, with a simpler two-caste model and a more complex three-way caste-antagonism model. The user workflow is to run a dataset generator, then open the corresponding analysis notebook to inspect and apply ML models to the generated or supplied simulation data. CPU and GPU generators provide alternative execution paths for the three-way model. The notebook internals were not sampled, so their detailed ML stages and links beyond the README’s description are not expanded.

Main entry points: [`DatasetGenerators/dataset_generator_3way_model_on_CPU.py`](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_CPU.py) (Three-way CPU generator), [`DatasetGenerators/dataset_generator_simple_model.py`](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_simple_model.py) (Simple generator), [`DatasetGenerators/dataset_generator_3way_model_on_GPU.py`](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_GPU.py) (Three-way GPU generator), [`Datasets`](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/tree/main/Datasets) (Three-way datasets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Simulation data"]
  node_simple_gen["Simple generator"]
  node_simple_sim["Simple simulation"]
  node_simple_data["Simple dataset"]
  node_cpu_gen["Three-way CPU generator"]
  node_cpu_sim["Three-way simulation"]
  node_gpu_gen["Three-way GPU generator"]
  node_three_data["Three-way datasets"]
  node_detail_cpu["Notebook CPU generator"]
  node_detail_gpu["Notebook GPU generator"]
end

subgraph group_analysis["ML analysis"]
  node_simple_nb["Simple model analysis"]
  node_three_nb["Three-way model analysis"]
end

node_user(("Researcher"))

node_user -->|"runs"| node_simple_gen
node_simple_gen -->|"simulates parameters"| node_simple_sim
node_simple_gen -->|"writes CSV"| node_simple_data
node_simple_data -->|"analyzed in"| node_simple_nb
node_user -->|"opens"| node_simple_nb
node_user -->|"runs"| node_cpu_gen
node_cpu_gen -->|"simulates parameters"| node_cpu_sim
node_cpu_gen -->|"writes CSV"| node_three_data
node_user -->|"runs"| node_gpu_gen
node_gpu_gen -->|"uses design and targets"| node_cpu_gen
node_gpu_gen -->|"writes CSV"| node_three_data
node_three_data -->|"analyzed in"| node_three_nb
node_user -->|"opens"| node_three_nb
node_detail_cpu -.->|"duplicates model"| node_cpu_sim
node_detail_gpu -.->|"uses CPU design"| node_detail_cpu

click node_simple_gen "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_simple_model.py"
click node_simple_sim "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_simple_model.py"
click node_simple_data "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/Datasets/ant_simple_model_dataset.csv"
click node_simple_nb "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/1.1-simple-ant-model-analysis.ipynb"
click node_cpu_gen "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_CPU.py"
click node_cpu_sim "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_CPU.py"
click node_gpu_gen "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_GPU.py"
click node_three_data "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/tree/main/Datasets"
click node_three_nb "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/1.2-3way-ant-model-analysis.ipynb"
click node_detail_cpu "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/dataset_generator_3way_model_on_CPU.py"
click node_detail_gpu "https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/dataset_generator_3way_model_on_GPU.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_simple_gen,node_simple_sim,node_simple_data,node_cpu_gen,node_cpu_sim,node_gpu_gen,node_three_data,node_detail_cpu,node_detail_gpu toneBlue
class node_simple_nb,node_three_nb toneAmber
class node_user toneIndigo
```

## Components

### Simulation data

- [Simple generator](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_simple_model.py): `DatasetGenerators/dataset_generator_simple_model.py`
- [Simple simulation](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_simple_model.py): `DatasetGenerators/dataset_generator_simple_model.py`
- [Simple dataset](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/Datasets/ant_simple_model_dataset.csv): `Datasets/ant_simple_model_dataset.csv`
- [Three-way CPU generator](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_CPU.py): `DatasetGenerators/dataset_generator_3way_model_on_CPU.py`
- [Three-way simulation](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_CPU.py): `DatasetGenerators/dataset_generator_3way_model_on_CPU.py`
- [Three-way GPU generator](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DatasetGenerators/dataset_generator_3way_model_on_GPU.py): `DatasetGenerators/dataset_generator_3way_model_on_GPU.py`
- [Three-way datasets](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/tree/main/Datasets): `Datasets`
- [Notebook CPU generator](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/dataset_generator_3way_model_on_CPU.py): `DetailedNotebooks/dataset_generator_3way_model_on_CPU.py`
- [Notebook GPU generator](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/dataset_generator_3way_model_on_GPU.py): `DetailedNotebooks/dataset_generator_3way_model_on_GPU.py`

### ML analysis

- [Simple model analysis](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/1.1-simple-ant-model-analysis.ipynb): `DetailedNotebooks/1.1-simple-ant-model-analysis.ipynb`
- [Three-way model analysis](https://github.com/envinyatartherenewer/ant_life_cycle_simulation_and_ml/blob/main/DetailedNotebooks/1.2-3way-ant-model-analysis.ipynb): `DetailedNotebooks/1.2-3way-ant-model-analysis.ipynb`

### Other components

- **Researcher**

## Connections

- Researcher → Simple generator: runs (evidence: `README.md`)
- Simple generator → Simple simulation: simulates parameters (evidence: `DatasetGenerators/dataset_generator_simple_model.py`)
- Simple generator → Simple dataset: writes CSV (evidence: `DatasetGenerators/dataset_generator_simple_model.py`)
- Simple dataset → Simple model analysis: analyzed in (evidence: `README.md`)
- Researcher → Simple model analysis: opens (evidence: `README.md`)
- Researcher → Three-way CPU generator: runs (evidence: `README.md`)
- Three-way CPU generator → Three-way simulation: simulates parameters (evidence: `DatasetGenerators/dataset_generator_3way_model_on_CPU.py`)
- Three-way CPU generator → Three-way datasets: writes CSV (evidence: `DatasetGenerators/dataset_generator_3way_model_on_CPU.py`)
- Researcher → Three-way GPU generator: runs (evidence: `README.md`)
- Three-way GPU generator → Three-way CPU generator: uses design and targets (evidence: `DatasetGenerators/dataset_generator_3way_model_on_GPU.py`)
- Three-way GPU generator → Three-way datasets: writes CSV (evidence: `DatasetGenerators/dataset_generator_3way_model_on_GPU.py`)
- Three-way datasets → Three-way model analysis: analyzed in (evidence: `README.md`)
- Researcher → Three-way model analysis: opens (evidence: `README.md`)
- Notebook CPU generator → Three-way simulation: duplicates model
- Notebook GPU generator → Notebook CPU generator: uses CPU design
