#ai #gamedev


Toolset for producing emergent gameplay for games written in Rust

22 stable releases

1.7.0 Jan 8, 2024
1.6.0 Jan 7, 2024
1.5.13 Nov 23, 2021
1.5.2 Sep 29, 2021
0.1.0 Apr 12, 2019

#319 in Simulation

Download history 11/week @ 2023-11-06 31/week @ 2023-11-13 33/week @ 2023-11-20 73/week @ 2023-11-27 25/week @ 2023-12-04 29/week @ 2023-12-11 9/week @ 2023-12-18 49/week @ 2023-12-25 33/week @ 2024-01-01 88/week @ 2024-01-08 27/week @ 2024-01-15 36/week @ 2024-01-22 104/week @ 2024-01-29 12/week @ 2024-02-05 86/week @ 2024-02-12 688/week @ 2024-02-19

890 downloads per month
Used in 3 crates (2 directly)


3.5K SLoC

Emergent AI


Toolset for producing emergent gameplay for games written in Rust


Emergent AI library is a set of modular building blocks to use for building smart agents, events and anything you want. The goal of this library is to generalize most well-known modern AI techniques into smaller units that when put together can produce smart behaviors of agents and game world itself.

When we focused on turning parts of modern AI systems into building blocks, we end up with these decision makers:

  • Machinery - Finite State Machine (or simply network of states connected by conditions to met for jumps to happen).
  • Reasoner - Utility AI agent (that scores each state and selects one with the highest score).
  • Planner - Goal Oriented Action Planning agent (finds the best path through all possible actions for goal selected by another decision maker assigned into this planner).
  • Sequencer - Goes through states (ones that are possible to run) in a sequence.
  • Selector - Selects only one state from list of possible states to run.
  • Parallelizer - Runs all states (that are possible to run) at the same time.

This modularity gives more power to the user, it allows user to build hierarchies of different decision makers to build the exact behavior user wants without putting limits on what is achievable!

Read more about all the concepts in the documentation


Read about developing your own AI systems in the book



Utility AI:

Utility AI


  • Create a small demo project to showcase the usage of this library.
  • Write a book describing how AI works in details and how to develop AI for games.
  • Research adding support for evolution-based neural networks?

No runtime deps