megamek.client.bot
Class GALance

java.lang.Object
  extended by megamek.client.bot.ga.GA
      extended by megamek.client.bot.GALance

public class GALance
extends GA


Field Summary
protected  java.lang.Object[] enemy_array
           
protected  java.util.ArrayList<MoveOption[]> moves
           
protected  TestBot tb
           
 
Fields inherited from class megamek.client.bot.ga.GA
best, chromosomeDim, chromosomes, populationDim
 
Constructor Summary
GALance(TestBot tb, java.util.ArrayList<MoveOption[]> moves, int population, int generations)
           
 
Method Summary
protected  void doRandomMutation(int iChromIndex)
           
protected  double getFitness(int iChromIndex)
           
 MoveOption getResult()
           
protected  void initPopulation()
           
 
Methods inherited from class megamek.client.bot.ga.GA
doExhaustiveSearch, doHeuristicPass, evolve, getAvgFitness, getESquared, getFittestChromosomesFitness, selectTwoParents, shouldDoExhaustive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

moves

protected java.util.ArrayList<MoveOption[]> moves

tb

protected TestBot tb

enemy_array

protected java.lang.Object[] enemy_array
Constructor Detail

GALance

public GALance(TestBot tb,
               java.util.ArrayList<MoveOption[]> moves,
               int population,
               int generations)
Method Detail

initPopulation

protected void initPopulation()
Specified by:
initPopulation in class GA

getFitness

protected double getFitness(int iChromIndex)
Specified by:
getFitness in class GA

getResult

public MoveOption getResult()

doRandomMutation

protected void doRandomMutation(int iChromIndex)
Specified by:
doRandomMutation in class GA