Читать книгу Cultural Algorithms - Robert G. Reynolds - Страница 27

Fitness Functions

Оглавление

Each problem available within the CAT System is contained within a Fitness Function, which not only dictates the domain of the problem but also the means by which it can possibly be updated, the metrics by which it can be judged, and any possible cutoff that could be reached by discovering a sought‐after goal.

First basic initialization is performed in which the domain of the problem is established, such as any necessary variables or placeholders, predefined boundaries or caps, or even a maximum possible fitness that the system is to work towards. There are also two functions called CalculateFitness and CalculateFunctionValue. In some cases, it is entirely possible that to get the fitness of a given fitness function, calculating the function itself will yield its fitness. Some other cases have a fitness which is separate from the function value calculated by the fitness function itself. Both Fitness and FunctionValue are calculated by being passed a point in N‐dimensional space, containing the given values for the variables that can alter the results of the system.

If a fitness function has a dimensional input smaller than three (meaning either two or one dimensional inputs), then it is possible for the system to display it in a manner used by the ConesWorld Fitness Function, where the two components of the input represent the X and Z coordinates, and the fitness at that location comprises the Y coordinate (Figure 2.3).

Following these commands are a collection of queries for data such as the constraints of the problem which returns a simple Boolean to denote if an input dimensional point falls within the previously defined domain of the problem. It is also possible to query for the size of the problem's dimensions and the domain constraints themselves.

For some problems that may be defined within the CAT System, it is possible for the actual answer to be known; however, in these cases the system is not aware of how it might reach this particular answer. For example, in an optimization problem, the system may attempt to alter the sizes of various interconnected machinery, each of which has its own constraints it must exist within. The system knows the answer it wants, but not how the parts might be modified to achieve this answer. Another example from ConesWorld has to do with the known dimensions of N‐cones that exist within it, and that it is efficient to query the list of cones for the one with the maximum height. Again, the system knows what the height of the cone is, but it does not need to share the location of that cone with any of the active agents.


Figure 2.3 The fitness of ConesWorld visualized, with the height at any given point representing that point's fitness.

Finally, there is a Change function within each fitness function. While the N‐dimensional points contain all of the variables of the function and can be altered repeatedly throughout the course of the simulation, the purpose of the Change function is to change the domain of the fitness function itself. It could change the structure of an equation, which variables are being used, and the topography of the fitness function itself. This will be further explored in the ConesWorld example given in the following section.

Cultural Algorithms

Подняться наверх