Closed zylkowski closed 2 years ago
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
is a kind of wildcard, e.g. if your grid values are ABCD
then the wildcard *
means any of those characters, but you can also declare a union like E
= AB
and then if you write E
in a rule, it will match either A or B.
By the way, this kind of question is better to ask in the discussion forum, rather than posting an issue.
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
union
in terms of markov algorithms? I couldn't find any explaination online that would fit behaviour I see in some examples.