edu.udo.cs.ie.cowbots.internalActions.experimental2
Class exKnowledge

Package class diagram package exKnowledge
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.internalActions.experimental2.exKnowledge
All Implemented Interfaces:
IKnowledgeOperator

public class exKnowledge
extends java.lang.Object
implements IKnowledgeOperator

knowledge operator for the mapc contest, as a fall back if we are running into dlv execution time problems


Field Summary
(package private)  java.util.HashMap<java.lang.String,ELPLiteral> agentposition
           
(package private)  java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,ELPLiteral>> miniBB
           
 
Constructor Summary
exKnowledge()
           
 
Method Summary
 void deleteFacts(java.util.Set<ELPLiteral> toDel)
          method that might ist called by the revision engine for facts occuring in the reject set of an inference operator. each knowledge operator is free to process or ignore the call.
 ELP getStateProgram()
          method that returns an extended logical programm (or null) that is concatenated to the belief state, therefore bypassing any belief state construction.
protected  void init()
           
 void init(org.w3c.dom.Element config)
          default initialization routine, will be called by the revision engine with a configuration description in xml
protected  ELPLiteral newerFact(int timeTerm, ELPLiteral a, ELPLiteral b)
          this method compares two literals based on their time-value encoded in a term argument.
 void processBeliefSet(BeliefSet bs, BeliefBase base)
          method that is called after the revision (asp call and answer set clearance) to add/delete beliefs to the belief set. the behavior depends on the implemented knowledge operator semantics.
 void reset()
          resets the knowledge operator, putting it back into a neutral state.
 boolean update(java.util.List<InformationObject> updates, BeliefBase bb)
          this method integrates information objects into the belief base.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentposition

java.util.HashMap<java.lang.String,ELPLiteral> agentposition

miniBB

java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,ELPLiteral>> miniBB
Constructor Detail

exKnowledge

public exKnowledge()
Method Detail

init

protected void init()

deleteFacts

public void deleteFacts(java.util.Set<ELPLiteral> toDel)
Description copied from interface: IKnowledgeOperator
method that might ist called by the revision engine for facts occuring in the reject set of an inference operator. each knowledge operator is free to process or ignore the call.

Specified by:
deleteFacts in interface IKnowledgeOperator
Parameters:
toDel - set of (head) literals to purge from the belief base

getStateProgram

public ELP getStateProgram()
Description copied from interface: IKnowledgeOperator
method that returns an extended logical programm (or null) that is concatenated to the belief state, therefore bypassing any belief state construction.

Specified by:
getStateProgram in interface IKnowledgeOperator
Returns:
null or elp to add to the belief state

init

public void init(org.w3c.dom.Element config)
Description copied from interface: IKnowledgeOperator
default initialization routine, will be called by the revision engine with a configuration description in xml

Specified by:
init in interface IKnowledgeOperator
Parameters:
config - XML Element describing operator setup

processBeliefSet

public void processBeliefSet(BeliefSet bs,
                             BeliefBase base)
Description copied from interface: IKnowledgeOperator
method that is called after the revision (asp call and answer set clearance) to add/delete beliefs to the belief set. the behavior depends on the implemented knowledge operator semantics.

Specified by:
processBeliefSet in interface IKnowledgeOperator

update

public boolean update(java.util.List<InformationObject> updates,
                      BeliefBase bb)
Description copied from interface: IKnowledgeOperator
this method integrates information objects into the belief base.

Specified by:
update in interface IKnowledgeOperator
Parameters:
updates - new information objects
bb - operator's belief base
Returns:
true if something changed (false otherwise).

newerFact

protected ELPLiteral newerFact(int timeTerm,
                               ELPLiteral a,
                               ELPLiteral b)
this method compares two literals based on their time-value encoded in a term argument.

Parameters:
timeTerm - index of time term
a - literal a
b - literal a or null
Returns:
a or b (whichever has higher time term)

reset

public void reset()
Description copied from interface: IKnowledgeOperator
resets the knowledge operator, putting it back into a neutral state.

Specified by:
reset in interface IKnowledgeOperator