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

java.lang.Object
  extended by net.sourceforge.cilib.games.agent.neural.NeuralStateInputStrategy
      extended by 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

Constructor Summary
PredatorPreyNeuralInputStrategy()
           
 
Method Summary
 int amountInputs()
          This NeuralStateInputStrategy requires 4 input units.
 Vector getNeuralInputArray(NeuralAgent currentPlayer, Game state)
          Get an input vector for the given game state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredatorPreyNeuralInputStrategy

public PredatorPreyNeuralInputStrategy()
Method Detail

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 Network
state - the current game state
Returns:
the input vector


Copyright © 2009 CIRG. All Rights Reserved.