Multi-agent system simulator (MASim). Allow users to create and configure environments, place agents in those environments, and observe how they interact or evolve over time.
![]() |
![]() |
|---|
-
Install Rust
-
Clone the repo:
git clone https://github.com/JoyousOne/MASim.git
cd MASim- Dependencies: Will be automatically installed when running cargo. To consult the dependencies, see Cargo.toml.
-
In
src/playgroundadd the file you want to play with. -
Import in
src/main.rsand tinker with it as you which. -
Build & Run:
cargo runIn this example, runners spawn in random positions. Their objective is to reach the goal, which is represented by a green cell. They start with a trained Q-table, after which they continue learning independently.
In this example, multiple bots explore a 2D map to find mineral veins. They form a swarm in the sense that they coordinate or share information. Concretely, they all reference and update a shared Q-table. This means that whenever any single bot has a learning update (e.g., it explores new territory, encounters a mineral, or hits a wall), that update modifies the Q-values for all bots. In other words, they are learning from collective experience, which can speed up learning if the environment and tasks are similar for all agents.

