Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1013 Bytes

README.md

File metadata and controls

31 lines (26 loc) · 1013 Bytes

Exchange Engine - A Market Exchange Simulator

Category theory inspired; where objects are assets and morphisms are rates, creating a mathematical formalization for an exchange (assets, accounts, rates and transactions).

Core component for OwnedEconomies

Requirements:

$ curl https://sh.rustup.rs -sSf | sh

Run tests:

cargo test -- --nocapture

Run examples:

cargo run --example robot_mission
  • In every tick agent should be able to purchase 1 MissionTime.
  • First it tries to purchase MissionTime with its Resource through Exchange::MissionTimeWithResource.
  • If this fails, it will try to purchase through Exchange::MissionTimeWithTrust.
  • If agent cannot purchase any more MissionTime it dies.

If everything worked you should see test results like this:

running 1 test
RIP! Agent was alive for 2 hours, 55 minutes and 1 seconds.
test agent_lifetime_until_death ... ok