{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,6]],"date-time":"2026-03-06T21:15:46Z","timestamp":1772831746585,"version":"3.50.1"},"reference-count":37,"publisher":"MDPI AG","issue":"9","license":[{"start":{"date-parts":[[2024,9,3]],"date-time":"2024-09-03T00:00:00Z","timestamp":1725321600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Slovenian Research And Innovation Agency","award":["P2-0246"],"award-info":[{"award-number":["P2-0246"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Symmetry"],"abstract":"<jats:p>Genetic programming (GP) has a long-standing tradition in the evolution of computer programs, predominantly utilizing tree and linear paradigms, each with distinct advantages and limitations. Despite the rapid growth of the GP field, there have been disproportionately few attempts to evolve \u2019real\u2019 Turing-like imperative programs (as contrasted with functional programming) from the ground up. Existing research focuses mainly on specific special cases where the structure of the solution is partly known. This paper explores the potential of integrating tree and linear GP paradigms to develop an encoding scheme that universally supports genetic operators without constraints and consistently generates syntactically correct Python programs from scratch. By blending the symmetrical structure of tree-based representations with the inherent asymmetry of linear sequences, we created a versatile environment for program evolution. Our approach was rigorously tested on 35 problems characterized by varying Halstead complexity metrics, to delineate the approach\u2019s boundaries. While expected brute-force program solutions were observed, our method yielded more sophisticated strategies, such as optimizing a program by restricting the division trials to the values up to the square root of the number when counting its proper divisors. Despite the recent groundbreaking advancements in large language models, we assert that the GP field warrants continued research. GP embodies a fundamentally different computational paradigm, crucial for advancing our understanding of natural evolutionary processes.<\/jats:p>","DOI":"10.3390\/sym16091146","type":"journal-article","created":{"date-parts":[[2024,9,3]],"date-time":"2024-09-03T09:56:42Z","timestamp":1725357402000},"page":"1146","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":2,"title":["Imperative Genetic Programming"],"prefix":"10.3390","volume":"16","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-4416-5432","authenticated-orcid":false,"given":"Iztok","family":"Fajfar","sequence":"first","affiliation":[{"name":"Faculty of Electrical Engineering, University of Ljubljana, Tr\u017ea\u0161ka 25, 1000 Ljubljana, Slovenia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5256-173X","authenticated-orcid":false,"given":"\u017diga","family":"Rojec","sequence":"additional","affiliation":[{"name":"Faculty of Electrical Engineering, University of Ljubljana, Tr\u017ea\u0161ka 25, 1000 Ljubljana, Slovenia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"\u00c1rp\u00e1d","family":"B\u0171rmen","sequence":"additional","affiliation":[{"name":"Faculty of Electrical Engineering, University of Ljubljana, Tr\u017ea\u0161ka 25, 1000 Ljubljana, Slovenia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7814-0781","authenticated-orcid":false,"given":"Matev\u017e","family":"Kunaver","sequence":"additional","affiliation":[{"name":"Faculty of Electrical Engineering, University of Ljubljana, Tr\u017ea\u0161ka 25, 1000 Ljubljana, Slovenia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6030-0820","authenticated-orcid":false,"given":"Tadej","family":"Tuma","sequence":"additional","affiliation":[{"name":"Faculty of Electrical Engineering, University of Ljubljana, Tr\u017ea\u0161ka 25, 1000 Ljubljana, Slovenia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Sa\u0161o","family":"Toma\u017ei\u010d","sequence":"additional","affiliation":[{"name":"Faculty of Electrical Engineering, University of Ljubljana, Tr\u017ea\u0161ka 25, 1000 Ljubljana, Slovenia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3288-8254","authenticated-orcid":false,"given":"Janez","family":"Puhan","sequence":"additional","affiliation":[{"name":"Faculty of Electrical Engineering, University of Ljubljana, Tr\u017ea\u0161ka 25, 1000 Ljubljana, Slovenia"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2024,9,3]]},"reference":[{"key":"ref_1","unstructured":"Koza, J.R. (1992). Genetic Programming: On the Programming of Computers by Means of Natural Selection, MIT Press."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Yampolskiy, R.V. (2018). Why We Do Not Evolve Software? Analysis of Evolutionary Algorithms. Evol. Bioinform., 14.","DOI":"10.1177\/1176934318815906"},{"key":"ref_3","first-page":"468","article-title":"Mathematical discoveries from program search with large language models","volume":"625","author":"Barekatain","year":"2023","journal-title":"Nature"},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Woodward, J., and Bai, R. (2009, January 12\u201314). Why evolution is not a good paradigm for program induction: A critique of genetic programming. Proceedings of the first ACM\/SIGEVO Summit on Genetic and Evolutionary Computation, Shanghai, China.","DOI":"10.1145\/1543834.1543915"},{"key":"ref_5","unstructured":"Teller, A. (1994, January 27\u201329). Turing completeness in the language of genetic programming with indexed memory. Proceedings of the First IEEE Conference on Evolutionary Computation. IEEE World Congress on Computational Intelligence, Orlando, FL, USA."},{"key":"ref_6","unstructured":"Banzhaf, W., Francone, F.D., Keller, R.E., and Nordin, P. (1998). Genetic Programming: An Introduction: On the Automatic Evolution of Computer Programs and Its Applications, Morgan Kaufmann Publishers Inc."},{"key":"ref_7","unstructured":"Brameier, M.F., and Banzhaf, W. (2007). Linear Genetic Programming, Springer."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"351","DOI":"10.1162\/evco_a_00174","article-title":"Evolving a Nelder-Mead Algorithm for Optimization with Genetic Programming","volume":"25","author":"Fajfar","year":"2016","journal-title":"Evol. Comput."},{"key":"ref_9","first-page":"187","article-title":"A representation for the adaptive generation of simple sequential programs","volume":"Volume 183","author":"Cramer","year":"1985","journal-title":"Proceedings of the First International Conference on Genetic Algorithms and Their Applications"},{"key":"ref_10","unstructured":"Augusto, D.A., and Barbosa, H.J.C. (2000, January 25). Symbolic regression via genetic programming. Proceedings of the Sixth Brazilian Symposium on Neural Networks, Rio de Janeiro, Brazil."},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Icke, I., and Bongard, J.C. (2013, January 20\u201323). Improving genetic programming based symbolic regression using deterministic machine learning. Proceedings of the 2013 IEEE Congress on Evolutionary Computation, Cancun, Mexico.","DOI":"10.1109\/CEC.2013.6557774"},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Evans, B., Al-Sahaf, H., Xue, B., and Zhang, M. (2018, January 8\u201313). Evolutionary Deep Learning: A Genetic Programming Approach to Image Classification. Proceedings of the 2018 IEEE Congress on Evolutionary Computation (CEC), Rio de Janeiro, Brazil.","DOI":"10.1109\/CEC.2018.8477933"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Bi, Y., Xue, B., and Zhang, M. (2021). Genetic Programming for Image Classification: An Automated Approach to Feature Learning, Springer.","DOI":"10.1007\/978-3-030-65927-1"},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"102571","DOI":"10.1016\/j.artmed.2023.102571","article-title":"A genetic programming-based convolutional deep learning algorithm for identifying COVID-19 cases via X-ray images","volume":"142","author":"Najaran","year":"2023","journal-title":"Artif. Intell. Med."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"101028","DOI":"10.1016\/j.swevo.2021.101028","article-title":"A novel binary classification approach based on geometric semantic genetic programming","volume":"69","author":"Bakurov","year":"2021","journal-title":"Swarm Evol. Comput."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"121","DOI":"10.1109\/TSMCC.2009.2033566","article-title":"A Survey on the Application of Genetic Programming to Classification","volume":"40","author":"Espejo","year":"2010","journal-title":"IEEE Trans. Syst. Man Cybern. Part C Appl. Rev."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Dara, O.A., Lopez-Guede, J.M., Raheem, H.I., Rahebi, J., Zulueta, E., and Fernandez-Gamiz, U. (2023). Alzheimer\u2019s Disease Diagnosis Using Machine Learning: A Survey. Appl. Sci., 13.","DOI":"10.3390\/app13148298"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Rovito, L., Bonin, L., Manzoni, L., and De Lorenzo, A. (2022). An Evolutionary Computation Approach for Twitter Bot Detection. Appl. Sci., 12.","DOI":"10.3390\/app12125915"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"106","DOI":"10.1109\/TSMCB.2005.854499","article-title":"Genetic programming for simultaneous feature selection and classifier design","volume":"36","author":"Muni","year":"2006","journal-title":"IEEE Trans. Syst. Man Cybern. Part B Cybern."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"2001734","DOI":"10.1080\/08839514.2021.2001734","article-title":"Prediction of Local Scour around Bridge Piers Using Hierarchical Clustering and Adaptive Genetic Programming","volume":"36","author":"Bor","year":"2022","journal-title":"Appl. Artif. Intell."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"1","DOI":"10.4018\/IJAMC.292515","article-title":"A Metaheuristic Optimization Algorithm for Solving Higher-Order Boundary Value Problems","volume":"13","author":"Alturky","year":"2022","journal-title":"Int. J. Appl. Metaheuristic Comput."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"253","DOI":"10.1007\/s10710-021-09425-5","article-title":"Genetic programming for iterative numerical methods","volume":"23","author":"Sobania","year":"2022","journal-title":"Genet. Program. Evolvable Mach."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"6617309","DOI":"10.1155\/2021\/6617309","article-title":"Control of Magnetic Manipulator Using Reinforcement Learning Based on Incrementally Adapted Local Linear Models","volume":"2021","author":"Brablc","year":"2021","journal-title":"Complexity"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Garc\u00eda, C.A., Velasco, M., Angulo, C., Marti, P., and Camacho, A. (2023). Revisiting Classical Controller Design and Tuning with Genetic Programming. Sensors, 23.","DOI":"10.20944\/preprints202311.1357.v1"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"291","DOI":"10.1016\/j.egyr.2021.11.103","article-title":"An efficient tree seed inspired algorithm for parameter estimation of Photovoltaic models","volume":"8","year":"2022","journal-title":"Energy Rep."},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"668","DOI":"10.1016\/j.egyr.2020.11.154","article-title":"A new binary variant with transfer functions of Harris Hawks Optimization for binary wind turbine micrositing","volume":"6","year":"2020","journal-title":"Energy Rep."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"174","DOI":"10.1016\/j.egyr.2022.10.386","article-title":"Parameter extraction for photovoltaic models with tree seed algorithm","volume":"9","year":"2023","journal-title":"Energy Rep."},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"6877","DOI":"10.1007\/s00521-019-04155-3","article-title":"A comparison of modified tree\u2013seed algorithm for high-dimensional numerical functions","volume":"32","author":"Beskirli","year":"2020","journal-title":"Neural Comput. Appl."},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"8166343","DOI":"10.1155\/2021\/8166343","article-title":"An Automatic Heuristic Design Approach for Seru Scheduling Problem with Resource Conflicts","volume":"2021","author":"Zhan","year":"2021","journal-title":"Discret. Dyn. Nat. Soc."},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"18","DOI":"10.1109\/MCI.2024.3363970","article-title":"Genetic Programming and Reinforcement Learning on Learning Heuristics for Dynamic Scheduling: A Preliminary Comparison","volume":"19","author":"Xu","year":"2024","journal-title":"IEEE Comput. Intell. Mag."},{"key":"ref_31","first-page":"4867","article-title":"Defocus Blur Segmentation Using Genetic Programming and Adaptive Threshold","volume":"70","author":"Mahmood","year":"2022","journal-title":"Comput. Mater. Contin."},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Correia, J., Rodriguez-Fernandez, N., Vieira, L., Romero, J., and Machado, P. (2022). Towards Automatic Image Enhancement with Genetic Programming and Machine Learning. Appl. Sci., 12.","DOI":"10.3390\/app12042212"},{"key":"ref_33","unstructured":"Koza, J.R., Goldberg, D.E., Fogel, D.B., and Riolo, R.L. (1996, January 28\u201331). The Benefits of Computing with Introns. Proceedings of the First Annual Conference, Stanford, CA, USA."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"450","DOI":"10.1007\/s10957-012-0122-6","article-title":"Hidden Genes Genetic Optimization for Variable-Size Design Space Problems","volume":"156","author":"Abdelkhalik","year":"2013","journal-title":"J. Optim. Theory Appl."},{"key":"ref_35","unstructured":"Baker, J.E. (1985, January 24\u201326). Adaptive Selection Methods for Genetic Algorithms. Proceedings of the 1st International Conference on Genetic Algorithms, Pittsburgh, PA, USA."},{"key":"ref_36","unstructured":"Ferreira, C. (2006). Automatically Defined Functions in Problem Solving. Gene Expression Programming: Mathematical Modeling by an Artificial Intelligence, Springer."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"21","DOI":"10.1007\/3-540-32498-4_2","article-title":"Automatically Defined Functions in Gene Expression Programming","volume":"Volume 13","author":"Nedjah","year":"2006","journal-title":"Genetic Systems Programming: Theory and Experiences"}],"container-title":["Symmetry"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-8994\/16\/9\/1146\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T15:48:05Z","timestamp":1760111285000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-8994\/16\/9\/1146"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,9,3]]},"references-count":37,"journal-issue":{"issue":"9","published-online":{"date-parts":[[2024,9]]}},"alternative-id":["sym16091146"],"URL":"https:\/\/doi.org\/10.3390\/sym16091146","relation":{},"ISSN":["2073-8994"],"issn-type":[{"value":"2073-8994","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,9,3]]}}}