Page 43 - 49A Field Guide to Genetic Programming
P. 43

Chapter 4




            Example


            Genetic Programming Run






            This chapter provides an illustrative run of GP in which the goal is to
            automatically create a program with a target input/output behaviour. In
            particular, we want to evolve an expression whose values match those of
                                    2
            the quadratic polynomial x + x + 1 in the range [−1, +1]. The process of
            mechanically creating a computer program that fit certain numerical data
            is sometimes called system identification or symbolic regression (see Sec-
            tion 12.2 for more).
               We begin with the five preparatory steps from the previous chapter and
            then describe in detail the events in one run.

            4.1    Preparatory Steps

            The purpose of the first two preparatory steps is to specify the ingredients
            the evolutionary process can use to construct potential solutions. Because
            the problem is to find a mathematical function of one independent variable,
            x, the terminal set (the inputs of the to-be-evolved programs) must include
            this variable. The terminal set also includes ephemeral random constants
                                          1
            drawn from some reasonable range, say from −5.0 to +5.0, as described in


               1 What is a “reasonable” range is likely to be extremely problem dependent. While in
            theory you can build up large constants using small constants and arithmetic operators,
            the performance of your system is likely to improve considerably if you provide constants
            of roughly the right magnitude from the beginning. Your choice of genetic operators can
            also be important here. If you’re finding that your system is struggling to evolve the
            right constants, it may be helpful to introduce mutation operators specifically designed
            to search of the space of constants.

                                            29
   38   39   40   41   42   43   44   45   46   47   48