Skip to main content

Advertisement

Log in

Stochastic L-system inference from multiple string sequence inputs

  • Application of soft computing
  • Published:
Soft Computing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

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

    Article  MathSciNet  Google Scholar 

  • 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

    Book  MATH  Google Scholar 

  • Ben-Naoum F (2009) A survey on L-system inference. INFOCOMP J Comput Sci 8(3):29–39

    Google Scholar 

  • Bergstra J, Bengio Y (2012) Random search for hyper-parameter optimization. J Mach Learn Res 13:281–305

    MathSciNet  MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • Breiman L (2001) Random forests. Mach Learn 45(1):5–32

    Article  MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • De La Higuera C (2005) A bibliographical study of grammatical inference. Pattern Recogn 38(9):1332–1348

    Article  Google Scholar 

  • De La Higuera C (2010) Grammatical inference: learning automata and grammars. Cambridge University Press

    Book  MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • Eichhorst P, Savitch WJ (1980) Growth functions of stochastic Lindenmayer systems. Inf Control 45(3):217–228

    Article  MathSciNet  MATH  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • Ho YC, Pepyne DL (2002) Simple explanation of the no-free-lunch theorem and its implications. J Optim Theory Appl 115(3):549–570

    Article  MathSciNet  MATH  Google Scholar 

  • Holliday DJ, Samal A (1995) Object recognition using L-system fractals. Pattern Recogn Lett 16:33–42

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • Lindenmayer A (1968) Mathematical models for cellular interaction in development, parts I and II. J Theor Biol 18(3):280–315

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • Měch R, Prusinkiewicz P (1996) Visual models of plants interacting with their environment. Proceedings of SIGGRAPH 1996:397–410

    Google Scholar 

  • 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

    Google Scholar 

  • Parikh RJ (1966) On context-free languages. J ACM 13(4):570–581

    Google Scholar 

  • 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

    Google Scholar 

  • Prusinkiewicz P, Lindenmayer A (1990) The algorithimic beauty of plants. Springer Verlag, New York

    Book  MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • Rongier G, Collon P, Renard P (2017) Stochastic simulation of channelized sedimentary bodies using a constrained L-system. Comput Geosci 105:158–168

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • University of Calgary: Algorithmic Botany. http://algorothmicbotany.org

Download references

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

Authors

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

Correspondence to Jason Bernard.

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

Table 4 Three sample procedurally generated S0L-systems and solution with \(|V| = 2\)
Table 5 Three sample procedurally generated S0L-systems and solution with \(|V| = 3\)
Table 6 One sample procedurally generated S0L-systems and solution with \(|V| = 5\)
Table 7 One sample procedurally generated S0L-system and solution with \(|V| = 6\)
Table 8 One sample procedurally generated S0L-system and solution with \(|V| = 7\)

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00500-022-07683-8

Keywords

Navigation