net.sourceforge.cilib.games.game.predatorprey
Class NeuralPreyOutputStrategy
java.lang.Object
net.sourceforge.cilib.games.agent.neural.NeuralOutputInterpretationStrategy
net.sourceforge.cilib.games.game.predatorprey.NeuralPreyOutputStrategy
public class NeuralPreyOutputStrategy
- extends NeuralOutputInterpretationStrategy
- Author:
- leo
This is a NeuralOutputInterpretationStrategy that will interperet the output of a neural network to make a movement decision for a Prey agent
Method Summary |
void |
applyOutputToState(TypeList outputData,
Agent currentPlayer,
Game oldState)
Modify the game by the output vector |
int |
getAmOutputs()
This strategy requires 5 outputs:
The first determins if the prey agent will Jump 2 cells, or move to an adjacent one
The second determines movement on the x axis
the third determines if that movement is left or right
The fourth determines movement on the y axes
The fifth 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 |
NeuralPreyOutputStrategy
public NeuralPreyOutputStrategy()
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 5 outputs:
The first determins if the prey agent will Jump 2 cells, or move to an adjacent one
The second determines movement on the x axis
the third determines if that movement is left or right
The fourth determines movement on the y axes
The fifth determines if it is up or down
- Specified by:
getAmOutputs
in class NeuralOutputInterpretationStrategy
- Returns:
- the output count
Copyright © 2009 CIRG. All Rights Reserved.