-
I really love the work in MarkovJunior and I'd like to attempt rewriting it in Rust. My idea is to write fully unoptimized version without inference first and then learning from the process I'd attempt writing full library with optimizations and inference. I am having trouble understanding two concepts though.
Why does nested MarkovNodes are prioritized when entered? I cannot see any advantage of this behaviour other than sometimes making the algorithm a bit more concise. What exactly is |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Nested Markov nodes aren't "prioritised", in the sense that there is no special case for the language's semantics. Basically to execute a Markov node, you repeatedly find its first applicable child and execute that, and you stop when none of the children are applicable. If one of the children is a Markov node then "executing the child" means you do that whole process and then return to the outer Markov node to continue executing it. It's analogous to nested loops in imperative languages - when you enter an inner loop, the inner loop has to complete all of its iterations before control returns to the outer loop - so you "ignore" everything outside the inner loop while it's executing. A |
Beta Was this translation helpful? Give feedback.
-
By the way, this kind of question is better to ask in the discussion forum, rather than posting an issue. |
Beta Was this translation helpful? Give feedback.
-
Good luck! Yeah, nested nodes are analogous to nested loops. If you have |
Beta Was this translation helpful? Give feedback.
Nested Markov nodes aren't "prioritised", in the sense that there is no special case for the language's semantics. Basically to execute a Markov node, you repeatedly find its first applicable child and execute that, and you stop when none of the children are applicable. If one of the children is a Markov node then "executing the child" means you do that whole process and then return to the outer Markov node to continue executing it.
It's analogous to nested loops in imperative languages - when you enter an inner loop, the inner loop has to complete all of its iterations before control returns to the outer loop - so you "ignore" everything outside the inner loop while it's executing.
A
union
…