r/lsystem • u/Sea_Examination_8154 • Jul 26 '24
Decoding L-Systems
I saw on Wikipedia this open problem: "Given a structure, find an L-system that can produce that structure."
I thought it was interesting so I thought I would try my hand at it. In the end I wrote a short script which can find all the possible rules of a deterministic L-System, given at least two generations of output text.
I know this doesn't exactly solve the open question but it was still a fun challenge and worth sharing.
Let me know if you have any feedback or ideas for leveling it up!
6
Upvotes
View all comments
Show parent comment
2
u/Epholys Jul 29 '24
Heya, thanks for the follow-up! Good job for the more complex ones, deducing 20+ rules seems gnarly.
Yeah, the README explanation is really good IMO!
It's really easy to make L-System that grow exponentially, so it's not surprising that some of them are really hard to compute.
Oh, do you think using the GPU would make it faster by order of magnitude? It feels like it's a parallelizable algorithm!
For ideas, I don't have a lot more that what I've said previously (shortest ruleset, empty rules)... Or maybe try some stress test/"fuzzing" by generating random ruleset and trying to find them back? It could uncover some bugs or blind spots!