Abstract
Lindenmayer systems (L-systems) are a grammar system that consists of string rewriting rules. The rules replace every symbol in a string in parallel with a successor to produce the next string, and this procedure iterates. In a stochastic context-free L-system (S0L-system), every symbol may have one or more rewriting rule, each with an associated probability of selection. Properly constructed rewriting rules have been found to be useful for modeling and simulating some natural and human engineered processes where each derived string describes a step in the simulation. Typically, processes are modeled by experts who meticulously construct the rules based on measurements or domain knowledge of the process. This paper presents an automated approach to finding stochastic L-systems, given a set of string sequences as input. The implemented tool is called the Plant Model Inference Tool for S0L-systems or PMIT-S0L. PMIT-S0L is evaluated using 960 procedurally generated S0L-systems in a test suite, which are each used to generate input strings, and PMIT-S0L is then used to infer the system from only the sequences. The evaluation shows that PMIT-S0L infers S0L-systems with up to 9 rewriting rules each in under 12 hours. Additionally, it is found that 3 sequences of strings are sufficient to find the correct original rewriting rules in \(100\%\) of the cases in the test suite, and 6 sequences of strings reduce the difference in the associated probabilities to approximately \(1\%\) or less.
Similar content being viewed by others
Data availability statement
One of the L-systems used in the data set is published, and appropriate citations are provided. The remainder are made by procedural generation, and so really belong as part of the code. The L-systems used as the basis for making the procedural generation routine are stored in the University of Calgary’s L-system repository, which we accessed with their permission.
Code Availability
PMIT-S0L is open source and available at https://github.com/jbernard-McMaster/PMIT.
References
Agu M, Yokoi Y (1985) A stochastic description of branching structures of trees. J Theor Biol 112(4):667–676
Al-Khiaty MAR, Ahmed M (2017) Matching UML class diagrams using a hybridized greedy-genetic algorithm. In: 2017 12th International scientific and technical conference on computer sciences and information technologies (CSIT), vol. 1, pp. 161–166. IEEE
Back T (1996) Evolutionary algorithms in theory and practice: evolution strategies, evolutionary programming. Oxford University Press, Genetic Algorithms
Ben-Naoum F (2009) A survey on L-system inference. INFOCOMP J Comput Sci 8(3):29–39
Bergstra J, Bengio Y (2012) Random search for hyper-parameter optimization. J Mach Learn Res 13:281–305
Bernard J, McQuillan I (2018) Inferring stochastic L-systems using a hybrid greedy algorithm. In: Proceedings of the 30th international conference on tools with artificial intelligence, pp. 600–607. IEEE
Bernard J, McQuillan I (2018) New techniques for inferring L-systems using genetic algorithm. In: Proceedings of the 8th international conference on bioinspired optimization methods and applications, Lecture Notes in Computer Science, vol. 10835, pp. 13–25. Springer
Bernard J, McQuillan I (2021) Techniques for inferring context-free Lindenmayer systems with genetic algorithm. Swarm Evol Comput 64:100893
Breiman L (2001) Random forests. Mach Learn 45(1):5–32
Danks G, Stepney S, Caves L (2008) Protein folding with stochastic L-systems. In: 11th International conference on the simulation and synthesis of living systems, pp. 150–157
Das Choudhury S, Bashyam S, Qiu Y, Samal A, Awada T (2018) Holistic and component plant phenotyping using temporal image sequence. Plant Methods 14(1):35
De La Higuera C (2005) A bibliographical study of grammatical inference. Pattern Recogn 38(9):1332–1348
De La Higuera C (2010) Grammatical inference: learning automata and grammars. Cambridge University Press
Doucet P (1974) The syntactic inference problem for D0L-sequences. L Systems pp. 146–161
Edwards C (2021) The best of NLP. Commun ACM 64(4):9–11
Eichhorst P, Savitch WJ (1980) Growth functions of stochastic Lindenmayer systems. Inf Control 45(3):217–228
Feliciangeli H, Herman GT (1973) Algorithms for producing grammars from sample derivations: a common problem of formal language theory and developmental biology. J Comput Syst Sci 7(1):97–118
Galarreta-Valverde MA, Macedo MM, Mekkaoui C, Jackowski M (2013) Three-dimensional synthetic blood vessel generation using stochastic L-systems. In: Medical imaging: image processing, p. 86691I
González MA, Sierra M, Vela CR, Varela R (2005) Genetic algorithms hybridized with greedy algorithms and local search over the spaces of active and semi-active schedules. In: Conference of the Spanish association for artificial intelligence, pp. 231–240. Springer
Guo J, Jiang H, Benes B, Deussen O, Zhang X, Lischinski D, Huang H (2020) Inverse procedural modeling of branching structures by inferring L-systems. ACM Transact Gr 39(5):1–13
Ho YC, Pepyne DL (2002) Simple explanation of the no-free-lunch theorem and its implications. J Optim Theory Appl 115(3):549–570
Holliday DJ, Samal A (1995) Object recognition using L-system fractals. Pattern Recogn Lett 16:33–42
Khan NA, Lyon OA, Eramian M, McQuillan I (2020) A novel technique combining image processing, plant development properties, and the Hungarian algorithm, to improve leaf detection in maize. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops, pp. 74–75
Lari K, Young SJ (1990) The estimation of stochastic context-free grammars using the inside-outside algorithm. Comput Speech Lang. 4(1):35–56
Lindenmayer A (1968) Mathematical models for cellular interaction in development, parts I and II. J Theor Biol 18(3):280–315
McQuillan I, Bernard J, Prusinkiewicz P (2018) Algorithms for inferring context-sensitive L-systems. In: 17th international conference on unconventional computation and natural computation, Lecture notes in computer science, vol. 10867, pp. 117–130. Springer International Publishing
Mündermann L, Erasmus Y, Lane B, Coen E, Prusinkiewicz P (2005) Quantitative modeling of Arabidopsis development. Plant Physiol 139:960–968
Měch R, Prusinkiewicz P (1996) Visual models of plants interacting with their environment. Proceedings of SIGGRAPH 1996:397–410
Nevill-Manning CG, Witten IH (1997) Linear-time, incremental hierarchy inference for compression. In: Proceedings DCC’97. Data compression conference, pp. 3–11. IEEE
Nishida T (1980) K0L-system simulating almost but not exactly the same development-case of japanese cypress. Mem Fac Sci 8(1):97–122
Parikh RJ (1966) On context-free languages. J ACM 13(4):570–581
Prusinkiewicz P, Cieslak M, Ferraro P, Hanan J (2018) Mathematical modelling in plant biology, chap. Modeling Plant Development with L-Systems, pp. 139–169. Springer
Prusinkiewicz P, Karwowski R, Lane B (2007) The L+C plant modelling language. Functl-Struct Plant Modell Crop Prod 22:27–42
Prusinkiewicz P, Lindenmayer A (1990) The algorithimic beauty of plants. Springer Verlag, New York
Prusinkiewicz P, Mündermann L, Karwowski R, Lane B (2001) The use of positional information in the modeling of plants. In: Proceedings of the 28th annual conference on computer graphics and interactive techniques, pp. 289–300. ACM
Prusinkiewicz P, Runions A (2012) Computational models of plant development and form. New Phytol 193:549–569
Rongier G, Collon P, Renard P (2017) Stochastic simulation of channelized sedimentary bodies using a constrained L-system. Comput Geosci 105:158–168
Rozenberg G, Salomaa A (2012) Lindenmayer systems: impacts on theoretical computer science, computer graphics, and developmental biology. Springer Science & Business Media
Runqiang B, Chen P, Burrage K, Hanan J, Room P, Belward J (2002) Derivation of L-system models from measurements of biological branching structures using genetic algorithms. In: Proceedings of the international conference on industrial, engineering and other applications of applied intelligent systems, pp. 514–524. Springer
Št’ava O, Beneš B, Měch R, Aliaga DG, Krištof P (2010) Inverse procedural modeling by automatic generation of L-systems. In: Computer graphics forum, vol. 29, pp. 665–674. Wiley Online Library
Ubbens J, Cieslak M, Prusinkiewicz P, Stavness I (2018) The use of plant models in deep learning: an application to leaf counting in rosette plants. Plant Methods 14(1):6
University of Calgary: Algorithmic Botany. http://algorothmicbotany.org
Acknowledgements
The authors thank Dr. Farhad Maleki for his assistance in acquiring the images for this paper.
Funding
This research was conducted as part of the Plant Phenotyping and Imaging Research Center, funded in part by the Canada First Research Fund, by National Science Engineering Research Council grant #2016-06172 (IM), and the Alexander Graham Bell Scholarship (JB).
Author information
Authors and Affiliations
Contributions
JB had the original idea for the algorithm, designed, developed, evaluated PMIT-S0L, wrote the first draft of the paper, and helped with the revision process. IM supervised the research, and revised the paper.
Corresponding author
Ethics declarations
Conflict of interest
We have no conflicts of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix A
Appendix A
This appendix contains some S0L-systems procedurally generated for this research and the resulting L-systems predicted by PMIT-S0L for a different number of input strings. Turtle graphics symbols were not included as it has been shown that including turtle graphics symbols makes inferring L-systems inductively easier (Bernard and McQuillan 2021). In all cases, the axiom for each system was set to “A”, and \(M = 3\). The solution for each system was created by executing PMIT-S0L once. See Tables 4, 5, 6, 7, and 8
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Bernard, J., McQuillan, I. Stochastic L-system inference from multiple string sequence inputs. Soft Comput 27, 6783–6798 (2023). https://doi.org/10.1007/s00500-022-07683-8
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00500-022-07683-8