A simple actor-based simulation of tag, implemented in rust.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Adrian Heine 22ffcbb1aa actor -> agent 3 months ago
benches Share get_world 3 months ago
src Extract draw_world 3 months ago
.gitignore Init 3 months ago
Cargo.toml Add benchmark 3 months ago
README.md actor -> agent 3 months ago
rustfmt.toml Init 3 months ago



gntag (from German »Guten Tag«: »good day«, roughly equivalent to »g'day«) is an agent-based simulation of tag implemented in rust.


git clone https://git.adrianheine.de/adrian/gntag.git
cd gntag
cargo run

To exit the simulation, press q, ESC or Ctrl+c.

Using as a library

src/main.rs is a pretty minimal example of the currently exposed high-level functionality. gntag::agent includes simpler agent iplementations and all the types, gntag::world contains ActualWorld and WorldState.


A few tests can be run with:

cargo test


cargo bench runs benchmarks. Their results are available under target/criterion/report/index.html.


  • The world is a simple two-dimensional rectangle with integer positions
  • Agents can occupy the same space
  • Agents can make one move per simulation step, either by trying to move by at most one unit in both directions or by trying to tag another agent
  • Agents need to be at most one unit away in both directions from others in order to tag them
  • Agents act at the same time and their actions are validated against the previous state