|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ai.planning.strips.Problem
public class Problem
A planning problem over a planning Domain is defined by an initial WorldState and a Goal. A SequentialPlan is a solution to such a planning problem if and only if its execution in the initial state results in a state in which the goal is satisfied.
Nested Class Summary | |
---|---|
protected static class |
Problem.ObjectTypeSystem
|
Field Summary | |
---|---|
protected Domain |
domain
the Domain over which this problem is defined |
protected Goal |
goal
the goal condition to be achieved |
protected WorldState |
initialState
the initial state of the world |
protected ai.krr.NamedSymbol |
name
the reference String that can be used to refer to this problem |
protected Problem.ObjectTypeSystem |
types
the inferred DomainTypes for objects in this Problem (computed on demand) |
Constructor Summary | |
---|---|
Problem(Domain d,
WorldState s0,
Goal g)
This constructor creates a new planning problem over the given domain. |
Method Summary | |
---|---|
protected Problem |
clone()
This class does not support cloning and an Exception will be thrown if this method is called. |
boolean |
equals(java.lang.Object obj)
This function tests whether this and the given problem are the same Object. |
Domain |
getDomain()
This function returns the domain over which this Problem is defined. |
Goal |
getGoal()
This function returns the goal conditions that define this Problem. |
WorldState |
getInitialState()
This function returns the initial state of the world that defines this Problem. |
java.util.Set<ai.krr.NamedSymbol> |
getInstances(Domain.DomainType type)
|
protected Problem.ObjectTypeSystem |
getObjectTypeSystem()
This function returns the inferred types for this Domain. |
int |
hashCode()
This function returns a hash value for this problem. |
protected java.lang.String |
objectString()
This function returns a String that is the String returned by this Object's toString function. |
void |
prettyPrint(int indent,
java.io.Writer w,
inf.compilers.SyntaxAdaptor sa)
This function can be used write this SyntaxAdaptable object to the given Writer. |
static Problem |
read(java.io.Reader r,
inf.compilers.SyntaxAdaptor<Problem> sa)
|
java.lang.String |
toString()
This function creates a String representation for this Problem. |
void |
write(java.io.Writer w,
inf.compilers.SyntaxAdaptor sa)
This function can be used write this logical Sentence to the given Writer. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Domain domain
protected WorldState initialState
protected Goal goal
protected ai.krr.NamedSymbol name
protected Problem.ObjectTypeSystem types
Constructor Detail |
---|
public Problem(Domain d, WorldState s0, Goal g)
This constructor creates a new planning problem over the given domain.
d
- the domain over which the problem is defineds0
- the initial state of the worldg
- the goal to be achievedMethod Detail |
---|
protected Problem clone() throws java.lang.CloneNotSupportedException
This class does not support cloning and an Exception will be thrown if this method is called.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- will be thrownpublic Domain getDomain()
This function returns the domain over which this Problem is defined.
getDomain
in interface Problem<ai.krr.fol.Atom>
public WorldState getInitialState()
This function returns the initial state of the world that defines this Problem.
getInitialState
in interface Problem<ai.krr.fol.Atom>
public Goal getGoal()
This function returns the goal conditions that define this Problem.
getGoal
in interface Problem<ai.krr.fol.Atom>
public void write(java.io.Writer w, inf.compilers.SyntaxAdaptor sa) throws inf.compilers.ExpressivenessException, java.io.IOException
This function can be used write this logical Sentence to the given Writer. The syntax in which it is written is defined by the SyntaxAdaptor that is also given to this function.
write
in interface inf.compilers.SyntaxAdaptable
w
- the Writer to which this Sentence is writtensa
- the SyntaxAdaptor that determines the syntax
inf.compilers.ExpressivenessException
- if the syntax does not support every
construct occurring in this Sentence
java.io.IOException
- if writing to the Writer failspublic void prettyPrint(int indent, java.io.Writer w, inf.compilers.SyntaxAdaptor sa) throws inf.compilers.ExpressivenessException, java.io.IOException
This function can be used write this SyntaxAdaptable object to the given Writer. The syntax is the same as for normal writing. The only difference is the inclusion of extra space and newlines for better readability.
prettyPrint
in interface inf.compilers.SyntaxAdaptable
indent
- the amount of indentation for the first linew
- the Writer to which this Sentence is writtensa
- the SyntaxAdaptor that determines the syntax
inf.compilers.ExpressivenessException
- if the syntax does not support every
construct occurring in this Sentence
java.io.IOException
- if writing to the Writer failspublic java.util.Set<ai.krr.NamedSymbol> getInstances(Domain.DomainType type)
protected Problem.ObjectTypeSystem getObjectTypeSystem()
This function returns the inferred types for this Domain. These will have to be computed the first time this function is called, but are then stored for future re-use.
protected java.lang.String objectString()
This function returns a String that is the String returned by this Object's toString function. Note that this makes it unique to this Problem.
String a unique String for this Problem
public boolean equals(java.lang.Object obj)
This function tests whether this and the given problem are the same Object.
equals
in class java.lang.Object
obj
- the Object this Problem is compared to
public int hashCode()
This function returns a hash value for this problem.
hashCode
in class java.lang.Object
public java.lang.String toString()
This function creates a String representation for this Problem.
toString
in class java.lang.Object
public static Problem read(java.io.Reader r, inf.compilers.SyntaxAdaptor<Problem> sa) throws inf.compilers.ExpressivenessException, java.text.ParseException, java.io.IOException
inf.compilers.ExpressivenessException
java.text.ParseException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |