public class KnowledgeBase
extends java.lang.Object
Constructor and Description |
---|
KnowledgeBase() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Clause> |
asCNF() |
boolean |
askWithTTEntails(java.lang.String queryString)
Returns the answer to the specified question using the TT-Entails
algorithm.
|
Sentence |
asSentence()
Returns the list of sentences in the knowledge base chained together as a
single sentence.
|
java.util.List<Sentence> |
getSentences()
Returns the list of sentences in the knowledge base.
|
java.util.Set<PropositionSymbol> |
getSymbols() |
int |
size()
Returns the number of sentences in the knowledge base.
|
void |
tell(Sentence aSentence)
Adds the specified sentence to the knowledge base.
|
void |
tell(java.lang.String aSentence)
Adds the specified sentence to the knowledge base.
|
void |
tellAll(java.lang.String[] percepts)
Each time the agent program is called, it TELLS the knowledge base what
it perceives.
|
java.lang.String |
toString() |
public void tell(java.lang.String aSentence)
aSentence
- a fact to be added to the knowledge base.public void tell(Sentence aSentence)
aSentence
- a fact to be added to the knowledge base.public void tellAll(java.lang.String[] percepts)
percepts
- what the agent perceivespublic int size()
public Sentence asSentence()
public java.util.Set<Clause> asCNF()
public java.util.Set<PropositionSymbol> getSymbols()
public boolean askWithTTEntails(java.lang.String queryString)
queryString
- a question to ASK the knowledge basepublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<Sentence> getSentences()