Skip to content

chance-wnb/secrets_of_bees

Repository files navigation

Worker Bee Simulation

A simulation of worker bees in a grid-based environment, where bees collect nutrients from food sources and deposit them in the hive.

Features

  • 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

Setup

  1. Clone this repository
  2. Install the required dependencies:
    pip install -r requirements.txt
    
  3. Create a .env file with your OpenAI API key:
    cp .env.example .env
    
    Then edit the .env file and add your OpenAI API key.

Running the Simulation

To run the simulation:

python main.py

This will:

  1. Initialize the world with a hive at the specified location
  2. Generate random food sources
  3. Create a worker bee
  4. Run the simulation for 50 steps

Customizing the Simulation

You can customize the simulation by modifying the parameters in main.py:

  • Change the hive location by modifying the hive_location parameter
  • Change the grid size by modifying the grid_size parameter
  • Change the number of steps by modifying the steps parameter in the run_simulation call

Tracing with Weave

The simulation uses Weave to trace the bee's behavior. You can view the traces in the Weights & Biases dashboard.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages