A simulation of worker bees in a grid-based environment, where bees collect nutrients from food sources and deposit them in the hive.
- Grid-based environment with customizable size and hive location
- Worker bees that can move, collect nutrients, deposit nutrients, communicate, and rest
- Food sources that can be discovered, depleted, and forgotten
- Hive cells that grow when they accumulate enough nutrients
- Weave integration for tracing and monitoring bee behavior
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt - Create a
.envfile with your OpenAI API key:Then edit thecp .env.example .env.envfile and add your OpenAI API key.
To run the simulation:
python main.py
This will:
- Initialize the world with a hive at the specified location
- Generate random food sources
- Create a worker bee
- Run the simulation for 50 steps
You can customize the simulation by modifying the parameters in main.py:
- Change the hive location by modifying the
hive_locationparameter - Change the grid size by modifying the
grid_sizeparameter - Change the number of steps by modifying the
stepsparameter in therun_simulationcall
The simulation uses Weave to trace the bee's behavior. You can view the traces in the Weights & Biases dashboard.
MIT