Because LGP programs are basically represented by a linear sequence of instructions, they are simpler to read and to operate on than their tree-based counterparts. For example, a simple program written to solve a Boolean function problem with 3 inputs (in R1, R2, R3) and one output (in R0), could read like this:
R1, R2, R3 have to be declared as input (read-only) registers, while R0 and R4 are declared as calculation (read-write) registers. This program is very simple, having just 5 instructions. But mutation and crossover operators could work to increase the length of the program, as well as the content of each of its instructions.
Note that one instruction is non-effective or an intron (marked), since it does not impact the output register R0. Recognition of those instructions is the basis for the intron removal algorithm which is used analyze code prior to execution. Technically, this happens by copying an individual and then run the intron removal once. The copy with removed introns is then executed as many times as dictated by the number of training cases. Notably, the original individual is left intact, so as to continue participating in the evolutionary process. It is only the copy that is executed that is compressed by removing these "structural" introns.
Another simple program, this one written in the LGP language Slash/A looks like a series of instructions separated by a slash:
By representing such code in bytecode format, i.e. as an array of bytes each representing a different instruction, one can make mutation operations simply by changing an element of such an array.
M. Brameier, W. Banzhaf, "Linear Genetic Programming", Springer, New York, 2007 https://link.springer.com/book/10.1007/978-0-387-31030-5 ↩
Brameier, M.: "On linear genetic programming Archived 2007-06-29 at the Wayback Machine", Dortmund, 2003 https://eldorado.uni-dortmund.de/handle/2003/20098 ↩
W. Banzhaf, P. Nordin, R. Keller, F. Francone, Genetic Programming - An Introduction, Morgan Kaufmann, Heidelberg/San Francisco, 1998 https://www.amazon.com/Genetic-Programming-Introduction-Artificial-Intelligence/dp/155860510X ↩
Poli, R.; Langdon, W. B.; McPhee, N. F. (2008). A Field Guide to Genetic Programming. Lulu.com, freely available from the internet. ISBN 978-1-4092-0073-4. 978-1-4092-0073-4 ↩
M. Brameier, W. Banzhaf, A Comparison of Linear Genetic Programming and Neural Networks in Medical Data Mining", IEEE Transactions on Evolutionary Computation, 5 (2001) 17-26 https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=7cb0f6755e325494afbda4f822026e8e6953ffe1 ↩
A. Guven, Linear genetic programming for time-series modelling of daily flow rate, J. Earth Systems Science, 118 (2009) 137-146 https://link.springer.com/article/10.1007/s12040-009-0022-9 ↩
R. Li, B.R. Noack, L. Cordier, J. Boree, F. Harambat, Drag reduction of a car model by linear genetic programming control, Experiments in Fluids, 58 (2017) 103 https://link.springer.com/article/10.1007/s00348-017-2382-2 ↩
P.-Y. Passagia, A. Quansah, N. Mazellier, G.Y. Cornejo Maceda, A. Kourta, Real-time feedback stall control of an airfoil at large Reynolds numbers using linear genetic programming, Physics of Fluids, 34 (2022) 045108 https://aip.scitation.org/doi/full/10.1063/5.0087874 ↩
Foundations of Genetic Programming. http://www.cs.ucl.ac.uk/staff/W.Langdon/FOGP/ ↩