Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Hexagonal Ant Foraging

A simple agent-based model simulating ant foraging behavior on a hexagonal grid. Agents (ants) leave the nest to find food, following pheromone trails. When they find food, they return to the nest, depositing a different pheromone to recruit other ants.

Features

  • HexGrid: Demonstrates mesa.discrete_space.HexGrid (toroidal).
  • PropertyLayer: Uses mesa.discrete_space.PropertyLayer for efficient pheromone and resource management (NumPy-backed).
  • Solara Visualization: Interactive visualization using SolaraViz and make_space_component.

Installation

To install the dependencies for this example, run:

pip install mesa[rec]

How to Run

To run the visualization:

solara run examples/hex_ant/app.py