Next: , Previous: , Up: Implementation   [Contents][Index]


2.3 Global Variables

The following global variables are exposed for configuration and interaction with heuristic search processes.

Variable: *population*

A list of the software objects currently known to the system. This variable may be read to inspect a running search process, or written to as part of a running search process.

Variable: *max-population-size*

Maximum allowable population size.

Variable: *tournament-size*

Number of individuals to participate in tournament selection. Default value is “2”.

Variable: *tournament-eviction-size*

Number of individuals to participate in eviction tournaments. Default value is “2”.

Variable: *fitness-predicate*

Function to compare two fitness values to select which is preferred. Default value is “#'>”.

Variable: *cross-chance*

Fraction of new individuals generated using crossover rather than mutation. Default value is “2/3”.

Variable: *mut-rate*

Chance to mutate a new individual. If value is less than 1 then new individuals will be mutated once with change *MUT-RATE*. If value is equal to 1, then every new individual will be mutated exactly once. If value is greater than 1, then new individuals will be mutated from 1 to *MUT-RATE* times. Default value is “1”.

Variable: *fitness-evals*

This variable tracks the total number of fitness evaluations performed.

Variable: *running*

True when a search process is running, set this variable to nil to stop a running search.