ABSTRACT
Genetic Improvement (GI) can be used to give better quality software and to create new functionality.
We show that GI can evolve the PowerPC open source GNU C runtime library square root function into cube root, binary logarithm log2 and reciprocal square root. The GI cbrt is competitive in run-time performance and our inverted square root x-1/2 is far more accurate than the approximation used in the Quake video game. We use CMA-ES to adapt constants in a Newton-Raphson table, originally from glibc's sqrt, for other double precision mathematics functions. Such automatically customised math libraries might be used for mobile or low resource, IoT, mote, smart dust, bespoke cyber-physical systems.
Evolutionary Computing (EC) can be used to not only adapt source code but also data, such as numerical constants, and could enable a new way to conduct software data maintenance. This is an exciting opportunity for the GECCO and optimisation communities.
Supplemental Material
Available for Download
p31-langdon_suppl.pdf
- Earl T. Barr et al. 2015. Automated Software Transplantation. In International Symposium on Software Testing and Analysis, ISSTA 2015, Tao Xie and Michal Young (Eds.). ACM, Baltimore, Maryland, USA, 257--269. ACM SIGSOFT Distinguished Paper Award. Google ScholarDigital Library
- Bobby R. Bruce et al. 2016. Deep Parameter Optimisation for Face Detection Using the Viola-Jones Algorithm in OpenCV. In Proceedings of the 8th International Symposium on Search Based Software Engineering, SSBSE 2016 (LNCS, Vol. 9962), Federica Sarro and Kalyanmoy Deb (Eds.). Springer, Raleigh, North Carolina, USA, 238--243. Google ScholarCross Ref
- Nikolaus Hansen and Andreas Ostermeier. 2001. Completely Derandomized Self-Adaptation in Evolution Strategies. Evolutionary Computation 9, 2 (Summer 2001), 159--195. Google ScholarDigital Library
- Oliver Krauss and W. B. Langdon. 2020. Automatically Evolving Lookup Tables for Function Approximation. In EuroGP 2020: Proceedings of the 23rd European Conference on Genetic Programming (LNCS, Vol. 12101), Ting Hu et al. (Eds.). Springer Verlag, Seville, Spain, 84--100. Google ScholarDigital Library
- W. B. Langdon. 2019. Genetic Improvement of Data gives double precision invsqrt. In 7th edition of GI @ GECCO 2019, Brad Alexander et al. (Eds.). ACM, Prague, Czech Republic, 1709--1714. Google ScholarDigital Library
- William B. Langdon et al. 2018. Evolving better RNAfold structure prediction. In EuroGP 2018: Proceedings of the 21st European Conference on Genetic Programming (LNCS, Vol. 10781), Mauro Castelli et al. (Eds.). Springer Verlag, Parma, Italy, 220--236. Google ScholarCross Ref
- William B. Langdon and Mark Harman. 2015. Optimising Existing Software with Genetic Programming. IEEE Transactions on Evolutionary Computation 19, 1 (Feb. 2015), 118--135. Google ScholarDigital Library
- William B. Langdon and Oliver Krauss. [n.d.]. Genetic Improvement of Data for Maths Functions. ACM Transactions on Evolutionary Learning and Optimization ([n. d.]). http://www.cs.ucl.ac.uk/staff/W.Langdon/ftp/papers/Langdon_TELO.pdf to appear.Google Scholar
- William B. Langdon and Oliver Krauss. 2020. Evolving sqrt into 1/x via Software Data Maintenance. In 9th edition of GI @ GECCO 2020, Brad Alexander et al. (Eds.). ACM, Internet, 1928--1936. Google ScholarDigital Library
- William B. Langdon and Justyna Petke. 2018. Evolving Better Software Parameters. In SSBSE 2018 Hot off the Press Track (LNCS, Vol. 11036), Thelma Elita Colanzi and Phil McMinn (Eds.). Springer, Montpellier, France, 363--369. Google ScholarCross Ref
- W. B. Langdon and Justyna Petke. 2019. Genetic Improvement of Data gives Binary Logarithm from sqrt. In GECCO '19: Proceedings of the Genetic and Evolutionary Computation Conference Companion, Richard Allmendinger et al. (Eds.). ACM, Prague, Czech Republic, 413--414. Google ScholarDigital Library
- Claire Le Goues et al. 2019. Automated Program Repair. Commun. ACM 62, 12 (Dec. 2019), 56--65. Google ScholarDigital Library
- P. W. Markstein. 1990. Computation of elementary functions on the IBM RISC System/6000 processor. IBM Journal of Research and Development 34, 1 (Jan 1990), 111--119. Google ScholarDigital Library
- Justyna Petke et al. 2014. Using Genetic Improvement and Code Transplants to Specialise a C++ Program to a Problem Class. In 17th European Conference on Genetic Programming (LNCS, Vol. 8599), Miguel Nicolau et al. (Eds.). Springer, Granada, Spain, 137--149. Google ScholarDigital Library
- Justyna Petke et al. 2018. Genetic Improvement of Software: a Comprehensive Survey. IEEE Transactions on Evolutionary Computation 22, 3 (June 2018), 415--432. http://dx.doi.org/ Google ScholarCross Ref
Index Terms
- Genetic improvement of data for maths functions
Recommendations
Genetic Improvement of Data for Maths Functions
We use continuous optimisation and manual code changes to evolve up to 1024 Newton-Raphson numerical values embedded in an open source GNU C library glibc square root sqrt to implement a double precision cube root routine cbrt, binary logarithm log2 and ...
Genetic improvement of data gives double precision invsqrt
GECCO '19: Proceedings of the Genetic and Evolutionary Computation Conference CompanionCMA-ES plus manual code changes rapidly transforms 512 Newton-Raphson start points from a GNU C library table driven version of sqrt into a double precision reciprocal square root function. The GI x-1/2 is far more accurate than Quake's InvSqrt, Quare ...
Genetic improvement of data gives binary logarithm from sqrt
GECCO '19: Proceedings of the Genetic and Evolutionary Computation Conference CompanionAutomated search in the form of the Covariance Matrix Adaptation Evolution Strategy (CMA-ES), plus manual code changes, transforms 512 Newton-Raphson floating point start numbers from an open source GNU C library, glibc, table driven square root ...
Comments