Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.


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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: