edu.udo.cs.ie.cowbots.arch
Class CowbotArch

Package class diagram package CowbotArch
java.lang.Object
  extended by AgArch
      extended by edu.udo.cs.ie.cowbots.arch.CowbotArch

public class CowbotArch
extends AgArch

customization of the jason AgArch class to meet requirements of our cowbot bdi implementation.


Nested Class Summary
private  class CowbotArch.ActionResponse
           
 
Field Summary
private  ICowbot cowAg
           
private  EnvironmentAdapter env
           
private  MassimAdapter massimAdapter
           
(package private)  java.util.List<CowbotArch.ActionResponse> pendingActions
           
 
Constructor Summary
CowbotArch()
           
 
Method Summary
 void act(ActionExec action, java.util.List<ActionExec> feedback)
          Send the action to the Massim Adapter While the action is being performed, the intention that made the action execution choice should be suspended.
 void initAg(java.lang.String agClass, ClassParameters bbPars, java.lang.String asSrc, Settings stts)
          custom agent initialization.
 java.util.List<Literal> perceive()
          checks the environment adapter for new percepts and returns them. at the moment, this implementation simply loads all percepts in order of insertion from the environment adapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

massimAdapter

private MassimAdapter massimAdapter

env

private EnvironmentAdapter env

cowAg

private ICowbot cowAg

pendingActions

java.util.List<CowbotArch.ActionResponse> pendingActions
Constructor Detail

CowbotArch

public CowbotArch()
Method Detail

initAg

public void initAg(java.lang.String agClass,
                   ClassParameters bbPars,
                   java.lang.String asSrc,
                   Settings stts)
            throws JasonException
custom agent initialization.

Throws:
JasonException

perceive

public java.util.List<Literal> perceive()
checks the environment adapter for new percepts and returns them. at the moment, this implementation simply loads all percepts in order of insertion from the environment adapter.


act

public void act(ActionExec action,
                java.util.List<ActionExec> feedback)
Send the action to the Massim Adapter While the action is being performed, the intention that made the action execution choice should be suspended. When the action is finished (successfully or not), it should be added in the feedback list so that the intention can be resumed. In the case of massim, we just sends the action and assume, that it was successfully performed by the environment when a new step begins. Possible actions are: skip, north, south, east, west, northwest, northeast, southwest, southeast