Re:Alchemist – A non-deterministic programming language base...
by a-nikolaev on Monday June 10, 2019 @08:05PM
(#20152058)
Yeah, Stochastic Pi-calculus and chemical reaction networks simulators are doing this this too. They actually precisely define the probabilities of reactions based on the current amount of different molecules and their reaction rates. For instance, I used the tool called Beta Workbench (BetaWB) and hand-written simulators for modeling systems like this. It's a really cool computational model, I think.
[ Parent
| on HN ]
Re:Alchemist – A non-deterministic programming language base...
by pacaro on Monday June 10, 2019 @10:33PM
(#20152647)
Adding relative weights to each rule would be a simple extension to the grammar. If only integer weights were permitted it could be a simple preprocessor.
Re:Alchemist – A non-deterministic programming language base...
by a-nikolaev on Tuesday June 11, 2019 @12:12PM
(#20156746)
Grammar yes, but sampling reaction with appropriate rates makes the choice of the next reaction a little harder than arbitrary selection.
The time to each possible event must be drawn from the exponential distribution (https://en.wikipedia.org/wiki/Exponential_distribution), and the event with the smallest waiting time fires next.