A simple actor-based simulation of tag, implemented in rust.
Find a file
2021-07-23 15:13:41 +02:00
benches Share get_world 2021-07-23 15:13:41 +02:00
src Share get_world 2021-07-23 15:13:41 +02:00
.gitignore Init 2021-07-21 23:02:02 +02:00
Cargo.toml Add benchmark 2021-07-22 22:48:02 +02:00
README.md Update readme 2021-07-22 22:48:13 +02:00
rustfmt.toml Init 2021-07-21 23:02:02 +02:00

gntag

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

Running

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

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

Tests

A few tests can be run with:

cargo test

Benchmarks

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

Simulation

  • 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 actor
  • 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