Skip to content

brupla6126/ruby_examples_ants

Repository files navigation

Ants

This example simulation shows the use of an Entity Component System framework and Behavior Trees.

🚧 !!! In construction !!! 🚧

Status

Branch Status
main Run tests suite
development Run tests suite

Installation

cd your_project_path
git clone https://github.com/brupla6126/ruby_examples_ants.git
cd ruby_examples_ants

Install Ruby2D native libraries on Ubuntu

sudo apt-get update && sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev

And then execute:

bin/setup

Usage

exe/ants

Resources

Ant types

  • Foragers
  • Larvaes
  • Queen
  • Soldiers
  • Workers

Goals

  • ✅ Ant wanders around
  • Forager will look for food
  • Forager will bring back food to colony
  • Forager will lay pheromone trail from food source to colony
  • Queen will initiate colony splitting
  • Queen will lay eggs
  • Soldier will carry heavy loads of food
  • Soldier will defend colony from intruders
  • Worker will care for queen and larvaes
  • Worker will feed fungus

Concepts

  • Entities

    • Ant
    • Colony
    • Food
    • Pheromone
  • Components

    • AI
    • Motion
    • Position
    • Renderable
  • Systems

    • AI
    • Bounding
    • Motion
    • Rendering
  • Behaviors

    • Ant::Wander
    • Ant::LookForFood
    • Ant::FoodNear
    • Ant::WalkToFood
    • Ant::PickupFood
    • Ant::DropPheromone
    • Ant::PheromoneNear
    • Ant::WalkToPheromone
    • Ant::WalkColony
    • Ant::DropFood
  • Renderers

    • Ant
    • Colony

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/brupla6126/ruby_examples_ants. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Ants project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

Ruby example: ants simulation

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published