net.sourceforge.cilib.games.game.predatorprey
Class NeuralPredatorOutputStrategy
java.lang.Object
net.sourceforge.cilib.games.agent.neural.NeuralOutputInterpretationStrategy
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.
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 |
NeuralPredatorOutputStrategy
public NeuralPredatorOutputStrategy()
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 vectorcurrentPlayer
- the agent that is represented by the Neural NetworkoldState
- 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.