FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
106 stars 21 forks source link

Mutable Messages or similar for conflict resolution #84

Open ptheywood opened 5 years ago

ptheywood commented 5 years ago

Useful for conflict resolution during message iteration,

Currently using atomics, but this does result in non-determinism, but performs relatively well.

ptheywood commented 5 years ago

Deterministic alternative for conflict resolution would be to use a submodel, which performs stable-marriage like behaviour, feeding the resolved state back to the ancestor model.

atomic mutability within a message is useful for non-deterministic behaviour, for reducing contested resource quantities, or for exclusive modification a messsage at one point in time.

Another use-case is when 2 agents interact, but do not care who with, they jsut need to know that they interacted, without another message output-input phase. The original agent could then read its' own message (which could be implemented as a specialisation for single_message messages if the order of threads has not changed.