net.sourceforge.cilib.problem.coevolution
Class GameLearningOptimizationProblem

java.lang.Object
  extended by net.sourceforge.cilib.problem.OptimisationProblemAdapter
      extended by net.sourceforge.cilib.problem.coevolution.PerformanceEvaluationOptimizationProblem
          extended by net.sourceforge.cilib.problem.coevolution.GameLearningOptimizationProblem
All Implemented Interfaces:
Serializable, OptimisationProblem, Problem, Cloneable
Direct Known Subclasses:
CompetitiveCoevolutionGameLearningOptimizationProblem

public class GameLearningOptimizationProblem
extends PerformanceEvaluationOptimizationProblem

Optimize either a single player game or a game against hand coded opponents

Author:
leo
See Also:
Serialized Form

Field Summary
protected  Game game
           
 
Fields inherited from class net.sourceforge.cilib.problem.coevolution.PerformanceEvaluationOptimizationProblem
fitnessCalculation, numberOfEvaluations
 
Fields inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
dataSetBuilder, fitnessEvaluations
 
Constructor Summary
GameLearningOptimizationProblem()
           
GameLearningOptimizationProblem(GameLearningOptimizationProblem copy)
          Copy constructor
 
Method Summary
protected  Fitness calculateFitness(Type solution)
          Determine the Fitness of the current Problem instance based on the provided solution.
 DomainRegistry getBehaviouralDomain()
          Returns the domain component that describes the search space of the needed behavioral characteristics of the problem.
 OptimisationProblemAdapter getClone()
          Create a cloned copy of the current object and return it.
 DomainRegistry getDomain()
          Returns the domain component that describes the search space for this problem.
 Game getGame()
           
 void playGame(int currentPlayerID, EntityScore currentScore)
          This method should be called after all the players have been initialized for this game the required amount of games are played and the scores are stored
 void setGame(Game game)
           
 
Methods inherited from class net.sourceforge.cilib.problem.coevolution.PerformanceEvaluationOptimizationProblem
getNumberOfEvaluations, setFitnessCalculation, setNumberOfEvaluations
 
Methods inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
accept, changeEnvironment, getChangeStrategy, getDataSetBuilder, getFitness, getFitnessEvaluations, setChangeStrategy, setDataSetBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

game

protected Game game
Constructor Detail

GameLearningOptimizationProblem

public GameLearningOptimizationProblem()

GameLearningOptimizationProblem

public GameLearningOptimizationProblem(GameLearningOptimizationProblem copy)
Copy constructor

Parameters:
copy -
Method Detail

getClone

public OptimisationProblemAdapter getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface OptimisationProblem
Specified by:
getClone in interface Problem
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class OptimisationProblemAdapter
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getBehaviouralDomain

public DomainRegistry getBehaviouralDomain()
Returns the domain component that describes the search space of the needed behavioral characteristics of the problem. This is mainly used for ECs, however, the use of behavioral parameters with PSO will be investigated.

Returns:
The domain of the behavioral component

getDomain

public DomainRegistry getDomain()
Returns the domain component that describes the search space for this problem.

Returns:
A DomainRegistry object representing the search space.

playGame

public void playGame(int currentPlayerID,
                     EntityScore currentScore)
This method should be called after all the players have been initialized for this game the required amount of games are played and the scores are stored

Parameters:
currentPlayerID - the id of the player being optimized
currentScore - the score's

calculateFitness

protected Fitness calculateFitness(Type solution)
Determine the Fitness of the current Problem instance based on the provided solution.

Specified by:
calculateFitness in class OptimisationProblemAdapter
Parameters:
solution - The Type representing the candidate solution.
Returns:
The Fitness of the solution in the current Problem.
See Also:
OptimisationProblemAdapter.getFitness(Type, boolean)

setGame

public void setGame(Game game)

getGame

public Game getGame()


Copyright © 2009 CIRG. All Rights Reserved.