net.sourceforge.cilib.games.game.tetris
Class PierreDellacherieTetrisEvaluator

java.lang.Object
  extended by net.sourceforge.cilib.games.game.tetris.PierreDellacherieTetrisEvaluator
All Implemented Interfaces:
StateEvaluator

public class PierreDellacherieTetrisEvaluator
extends Object
implements StateEvaluator

Author:
leo This is an implimentation of the Tetris StateEvaluator that was created by Pierre Dellacherie in 2003. The implimentation was adapted from code downloaded from http://colinfahey.com/tetris/tetris_en.html

Constructor Summary
PierreDellacherieTetrisEvaluator()
           
 
Method Summary
 double evaluateState(Game<GameState> state, int decisionPlayerID)
          Evaluate a given GameState for a given player ID.
 DomainRegistry getEvaluatorDomain()
          If the evaluator can be optimized then the evaluator data should be in a specific domain, this function should return that domain
 void initializeEvaluator(Type evaluatorData)
          Some state evaluators can be optimised, and therefore the evaluator should be initialized with evaluator specific data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PierreDellacherieTetrisEvaluator

public PierreDellacherieTetrisEvaluator()
Method Detail

evaluateState

public double evaluateState(Game<GameState> state,
                            int decisionPlayerID)
Evaluate a given GameState for a given player ID.

Specified by:
evaluateState in interface StateEvaluator
Parameters:
state - the Game object that is at a specific state that needs to be evaluated
decisionPlayerID - The player that has to make a decision
Returns:
the rating of the state.

getEvaluatorDomain

public DomainRegistry getEvaluatorDomain()
If the evaluator can be optimized then the evaluator data should be in a specific domain, this function should return that domain

Specified by:
getEvaluatorDomain in interface StateEvaluator
Returns:
The domain of the evaluator

initializeEvaluator

public void initializeEvaluator(Type evaluatorData)
Some state evaluators can be optimised, and therefore the evaluator should be initialized with evaluator specific data.

Specified by:
initializeEvaluator in interface StateEvaluator
Parameters:
evaluatorData - the data that determines how the evaluator should funciton


Copyright © 2009 CIRG. All Rights Reserved.