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.
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.
Re:Alchemist – A non-deterministic programming language base...
by cross_wiber on Monday June 10, 2019 @08:01PM
(#20152041)
I believe this language is based on the "chemical programming" model as described in http://pop-art.inrialpes.fr/~fradet/PDFs/RULE04.pdf and https://www.researchgate.net/publication/225418037_Higher-Or....
I hadn't thought of the connection to the join calculus - that's pretty cool!
There is a very detailed tutorial (which appears to have sadly half-broken formatting) which explains JoCaml in more detail here: https://sites.google.com/site/winitzki/tutorial-on-join-calc...