mxgmn / MarkovJunior

Probabilistic language based on pattern matching and constraint propagation, 153 examples
MIT License
7.49k stars 316 forks source link

The intro page does not explain how MJ start running when there's no rule matched at the first place #47

Closed markringo closed 2 years ago

markringo commented 2 years ago

Take the simple Growth model for example, when you start the MJ it's all Bs on the grid so there's no "WB" to start with, so in what mechanism does MJ put a W in center (or via any other way) so that a "WB" can be matched therefore Growth can actually "grow"?

I guess the property "origin=True" might be the trick, but after a rough browsing I somehow can't find the right source (and it seems to me that it could be more "configurable" than just a boolean) to this design and I think this needs some serious explanation at the first section of the intro.

mxgmn commented 2 years ago

It's indeed the origin, I explain this in syntax overview:

If origin is set True, the interpreter creates a pixel at the center of the grid with the value equal to the second value in values. For example, values="YRBAN" origin="True" creates a yellow screen with a red dot in the center.

markringo commented 2 years ago

It's indeed the origin, I explain this in syntax overview:

Oh I missed it, thanks.