How aamirsahil/rl-ant-python works
This repository implements an ant pheromone-trail reinforcement-learning simulation. The principal workflow is to configure an experiment, create a cellular world and ants, step the world while ants sense pheromones and act, and collect per-agent simulation data for serialization. The sampled code also shows pheromone-cell behavior and hooks for Q-learning and neural-network components; those imported modules are not present in the supplied tree. The README documents only the project’s broad purpose, so details beyond the excerpts are limited.
Main entry points: internal_external_multi.py Simulation loop · cellular.py Cellular world · main.py Experiment runner
Components 9
Experiment orchestration
- Experiment runner
main.py - Serialized results
main.py
Ant simulation
- Simulation loop
internal_external_multi.py - Cellular world
cellular.py - Pheromone cells
internal_external_multi.py - Ant agents
internal_external_multi.py - Run data capture
internal_external_multi.py
Learning components
- Q-learning
- Neural network
Connections 11
- Experiment runner → Simulation loop: runs
main.py - Experiment runner → Serialized results: serializes
main.py - Simulation loop → Cellular world: constructs
internal_external_multi.py - Simulation loop → Cellular world: loads map
internal_external_multi.py - Simulation loop → Cellular world: steps
internal_external_multi.py - Cellular world → Ant agents: updates
cellular.py - Ant agents → Cellular world: inherits movement
internal_external_multi.py - Simulation loop → Ant agents: creates
internal_external_multi.py - Simulation loop → Run data capture: records
internal_external_multi.py - Ant agents → Q-learning: uses
internal_external_multi.py - Ant agents → Neural network: uses
internal_external_multi.py