net.sourceforge.cilib.games.game.predatorprey
Class NeuralPredatorOutputStrategy

java.lang.Object
  extended by net.sourceforge.cilib.games.agent.neural.NeuralOutputInterpretationStrategy
      extended by net.sourceforge.cilib.games.game.predatorprey.NeuralPredatorOutputStrategy

public class NeuralPredatorOutputStrategy
extends NeuralOutputInterpretationStrategy

Author:
leo This is a NeuralOutputInterpretationStrategy that will interperet the output of a neural network to make a movement decision for a Predator agent.

Constructor Summary
NeuralPredatorOutputStrategy()
           
 
Method Summary
 void applyOutputToState(TypeList outputData, Agent currentPlayer, Game oldState)
          Modify the game by the output vector
 int getAmOutputs()
          This strategy requires 4 outputs: The first determines movement on the x axis the second determines if that movement is left or right The third determines movement on the y axes The fourth determines if it is up or down
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeuralPredatorOutputStrategy

public NeuralPredatorOutputStrategy()
Method Detail

applyOutputToState

public void applyOutputToState(TypeList outputData,
                               Agent currentPlayer,
                               Game oldState)
Modify the game by the output vector

Specified by:
applyOutputToState in class NeuralOutputInterpretationStrategy
Parameters:
outputData - the output data vector
currentPlayer - the agent that is represented by the Neural Network
oldState - the game state to be altered

getAmOutputs

public int getAmOutputs()
This strategy requires 4 outputs: The first determines movement on the x axis the second determines if that movement is left or right The third determines movement on the y axes The fourth determines if it is up or down

Specified by:
getAmOutputs in class NeuralOutputInterpretationStrategy
Returns:
the output count


Copyright © 2009 CIRG. All Rights Reserved.