edu.udo.cs.ie.cowbots.internalActions.scout
Class getRandomScoutCandidate

Package class diagram package getRandomScoutCandidate
java.lang.Object
  extended by DefaultInternalAction
      extended by edu.udo.cs.ie.cowbots.internalActions.scout.getRandomScoutCandidate

public class getRandomScoutCandidate
extends DefaultInternalAction

This class implements an internal action which computes a candidate point for the scout, if the world is known (the predicate "worldknown must be set in the context of the ASL-Plan). Since there is no Weight for the Points and we dont want any Point favored, we just choose a target at random.


Field Summary
(package private)  ICowbot cowbot
           
(package private)  GridMap map
           
(package private)  java.awt.Point randomtarget
           
 
Constructor Summary
getRandomScoutCandidate()
           
 
Method Summary
private  java.awt.Point calculateRandomTarget()
          Utility function for calculating a random target in the world, which is not a switch or an obstacle
 java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

GridMap map

cowbot

ICowbot cowbot

randomtarget

java.awt.Point randomtarget
Constructor Detail

getRandomScoutCandidate

public getRandomScoutCandidate()
Method Detail

execute

public java.lang.Object execute(TransitionSystem ts,
                                Unifier un,
                                Term[] args)
                         throws java.lang.Exception
Throws:
java.lang.Exception

calculateRandomTarget

private java.awt.Point calculateRandomTarget()
Utility function for calculating a random target in the world, which is not a switch or an obstacle

Returns:
Point encoding the coordinates