rusty_agent

Crates.iorusty_agent
lib.rsrusty_agent
version0.1.1
sourcesrc
created_at2022-09-11 14:21:32.448707
updated_at2022-09-11 15:11:13.198709
descriptionmulti-agent systems framework.
homepage
repositoryhttps://github.com/tmetsch/rusty_agent/
max_upload_size
id663070
size30,356
(tmetsch)

documentation

README

Multi-agent framework in Rust

This is a simple framework enabling multi-agent systems. Originally developed to test distributed planning & decision-making for this crate, it can be used for various other use cases.

It uses ZeroMQ for messaging between the agents. Each agent internally works with two threads. One which listen to message from other agents, another which continuously "pings" it's neighbours. This pinging allows agents to join and leave a system-of-systems on the fly. Once an agent is pinged it will include information about the neighbours it knows about to the other agents.

Example

An example is provided - first start the first agent, it will broadcast a hello world to its neighbours. It will wait till other agents have joined the system-of-systems:

$ cargo run --example sample_agent 0

The program parameter "0" indicates the id of the agent, as well as the port it will use.

Now another agent can be started - which will connect to the previous one, wait for the "hello world" and stop:

$ cargo run --example sample_agent 1
Commit count: 5

cargo fmt