|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.ai.geneticalgorithm.AbstractGeneticAlgorithm
org.vizzini.game.boardgame.AbstractGameGeneticAlgorithm
org.vizzini.example.tictactoe.TicTacToeGeneticAlgorithm
public class TicTacToeGeneticAlgorithm
Provides a game genetic algorithm for tic-tac-toe. This algorithm breeds neural network evaluators using game agent competition.
| Field Summary |
|---|
| Fields inherited from class org.vizzini.ai.geneticalgorithm.AbstractGeneticAlgorithm |
|---|
_crossoverFraction, _crossoverType, _elapsedTime, _generation |
| Constructor Summary | |
|---|---|
TicTacToeGeneticAlgorithm(boolean isBoardPrinted)
Construct this object using the given parameters. |
|
| Method Summary | |
|---|---|
protected IComputerAgent |
createAgent0()
Create agent 0. |
protected IComputerAgent |
createAgent1()
Create agent 1. |
protected IChromosome |
createChromosome()
Create a new chromosome. |
protected INeuralNetwork |
createNeuralNetworkExemplar()
Fill the population with random chromosomes. |
protected void |
fillPopulation()
Fill the population with random chromosomes. |
protected String |
getGamePropertiesPath()
Return the game properties path. |
protected String |
getNeuralNetworkFilepath()
Return the neural network filepath. |
static void |
main(String[] args)
Application method. |
| Methods inherited from class org.vizzini.game.boardgame.AbstractGameGeneticAlgorithm |
|---|
configureAgent, createGame, evaluateFitness, getFitnessLoss, getFitnessTie, getFitnessWin, getGame, getMaxOpponentCount, isVerbose, rewardAndPunish, setAgent0, setAgent1, setFitnessLoss, setFitnessTie, setFitnessWin, setGame, setTurnNumberConsidered, setVerbose, toString, zeroCounts |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.vizzini.ai.geneticalgorithm.IGeneticAlgorithm |
|---|
getCrossoverFraction, getCrossoverType, getElapsedTime, getGeneration, getMostFit, getMutationFraction, getMutationMagnitude, getMutationRate, getPopulationSize, getProcessingRate, reset, runGenerations, setAverageCrossoverFraction, setCrossoverFraction, setCrossoverType, setDuplicateAllowed, setMutationFraction, setMutationMagnitude, setMutationRate, setPopulationSize, writeReport |
| Constructor Detail |
|---|
public TicTacToeGeneticAlgorithm(boolean isBoardPrinted)
throws InstantiationException,
IllegalAccessException
isBoardPrinted - Flag indicating whether to print the board when
triggered by state changes.
InstantiationException
IllegalAccessException| Method Detail |
|---|
public static void main(String[] args)
throws Exception
args - 0-population size (optional)Exceptionprotected IComputerAgent createAgent0()
createAgent0 in class AbstractGameGeneticAlgorithmprotected IComputerAgent createAgent1()
createAgent1 in class AbstractGameGeneticAlgorithmprotected IChromosome createChromosome()
createChromosome in class AbstractGeneticAlgorithmprotected INeuralNetwork createNeuralNetworkExemplar()
protected void fillPopulation()
fillPopulation in class AbstractGeneticAlgorithmprotected String getGamePropertiesPath()
getGamePropertiesPath in class AbstractGameGeneticAlgorithmprotected String getNeuralNetworkFilepath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |