Overview
HADES (HADES Asynchronous Discrete-Event Simulation) is a small, user friendly framework for creating simulations in python!
Features¶
- 🎲🤖 Supports both Agent Based and Process Based models - how you model the entities in your simulation is up to you!
- ⚡ Async execution within a time-step - designed for working IO-bound workloads over the network (e.g. LLM APIs, db lookups, etc)
- 📈 Visualisation -
websockets
support to for building a custom frontend for your sim,matplotlib
in a Jupyter notepad or simply outputting amermaid
diagram - 🏷️ Pydantic style immutable events - type hints and enforcement make sure its clear what events contain
- 📦 Encapsulated simulated processes - processes or agents are encapsulated, keeping state manageable and making it possible to swap processes in and out
- 😊 User friendly - pattern matching on pydantic based events makes for an intuitive way to build simulations, while the separation of state helps avoid potential footguns!
Installation¶
Usage¶
Using the Hades Framework is as simple as creating your custom Process
es and Event
s, registering them in the simulation, and letting Hades take care of the rest.
Examples¶
Here are some of the fun things you might do with it:
- Simple Simulation - A simple simulation of Odysseus dodging the wrath of the gods to get started with
- Boids and Websockets - The classic Boids simulation with live canvas and d3.js visualisation via websockets.
- Multi Agent LLM Storytelling - Retelling the Odyssey with LLMs - demonstrates the highly IO bound stuff hades is good at. Some output: > "He remembered the sea nymph who had helped him before and realized that having allies like her was crucial to his success. He also continued to use his technological knowledge to stay ahead of Poseidon's wrath, utilizing his drone and sonar to navigate the waters safely."
- Battery charging station - to help compare what building a simulation looks with
simpy
vshades