net.sourceforge.cilib.games.game.predatorprey
Class PredatorPreyNeuralInputStrategy
java.lang.Object
net.sourceforge.cilib.games.agent.neural.NeuralStateInputStrategy
net.sourceforge.cilib.games.game.predatorprey.PredatorPreyNeuralInputStrategy
public class PredatorPreyNeuralInputStrategy
- extends NeuralStateInputStrategy
- Author:
- leo
This is the neural input strategr for a Predator or Prey agent. It determins how the game is described to the NeuralAgent
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PredatorPreyNeuralInputStrategy
public PredatorPreyNeuralInputStrategy()
amountInputs
public int amountInputs()
- This NeuralStateInputStrategy requires 4 input units. The first two is the position of the Predator agent, and the 2nd two is the position of the Prey agent.
- Specified by:
amountInputs
in class NeuralStateInputStrategy
- Returns:
- the input count
getNeuralInputArray
public Vector getNeuralInputArray(NeuralAgent currentPlayer,
Game state)
- Get an input vector for the given game state
- Specified by:
getNeuralInputArray
in class NeuralStateInputStrategy
- Parameters:
currentPlayer
- the agent represented by the Neural Networkstate
- the current game state
- Returns:
- the input vector
Copyright © 2009 CIRG. All Rights Reserved.