sdt.ga
Class GeneticAlgorithm

java.lang.Object
  |
  +--sdt.dist.Program
        |
        +--sdt.ga.GeneticAlgorithm
Direct Known Subclasses:
AsyncGeneticAlgorithm

public class GeneticAlgorithm
extends Program
implements java.io.Serializable

This class implements the main module in a GA. The GeneticAlgorithm class calls various operations involved in a GA.

See Also:
Serialized Form

Field Summary
 CostView costView
           
 double crossover_percentage
           
 boolean distributed
          variable indicating if GA is run in a distributed fashion.
 int elitism_level
           
 int evaluation_count
           
 java.lang.Class fitness_class
          class of organism fitness
 GaView gaView
           
 int generationNo
           
 int generations
           
 boolean graphics
           
 boolean mga
          variable indicating if MGA solutions are required.
 java.util.Vector mga_solns
           
 boolean minimize_evaluations
           
 double mutation_rate
           
 int n_mga
          Number of MGA solutions needed.
 double niching_percentage
           
 java.lang.Class organism_class
           
 int population_size
           
 int print_level
           
static java.util.Random random
           
 boolean save_mode
           
static int seed
           
 boolean seeded
           
 double select_fittest_percentage
           
 double sharing_percentage
           
 OutputObserver textObs
          These is the observer which pipes the print statements to the GUI text screen.
 
Constructor Summary
GeneticAlgorithm()
           
GeneticAlgorithm(java.lang.Class c)
          default constructor for GA class
GeneticAlgorithm(java.lang.Class organismClass, java.lang.Class fitnessClass)
          Creates an instance of a GeneticAlgorithm class with the specified organism and fitness classes.
 
Method Summary
 void evaluate(Organism org)
           
 java.lang.Object run(boolean distributed)
          Implements the run method with various steps involved in a genetic algorithm.
 
Methods inherited from class sdt.dist.Program
addJob, block
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fitness_class

public java.lang.Class fitness_class
class of organism fitness

organism_class

public java.lang.Class organism_class

generations

public int generations

population_size

public int population_size

crossover_percentage

public double crossover_percentage

niching_percentage

public double niching_percentage

select_fittest_percentage

public double select_fittest_percentage

mutation_rate

public double mutation_rate

mga

public boolean mga
variable indicating if MGA solutions are required.

n_mga

public int n_mga
Number of MGA solutions needed.

mga_solns

public java.util.Vector mga_solns

minimize_evaluations

public boolean minimize_evaluations

evaluation_count

public int evaluation_count

generationNo

public int generationNo

textObs

public OutputObserver textObs
These is the observer which pipes the print statements to the GUI text screen.

elitism_level

public int elitism_level

sharing_percentage

public double sharing_percentage

print_level

public int print_level

seeded

public boolean seeded

save_mode

public boolean save_mode

seed

public static int seed

random

public static java.util.Random random

gaView

public GaView gaView

costView

public CostView costView

distributed

public boolean distributed
variable indicating if GA is run in a distributed fashion.

graphics

public boolean graphics
Constructor Detail

GeneticAlgorithm

public GeneticAlgorithm()

GeneticAlgorithm

public GeneticAlgorithm(java.lang.Class c)
default constructor for GA class

GeneticAlgorithm

public GeneticAlgorithm(java.lang.Class organismClass,
                        java.lang.Class fitnessClass)
Creates an instance of a GeneticAlgorithm class with the specified organism and fitness classes.
Method Detail

run

public java.lang.Object run(boolean distributed)
Implements the run method with various steps involved in a genetic algorithm.
Overrides:
run in class Program

evaluate

public void evaluate(Organism org)