Class Character
java.lang.Object
edu.uky.cs.nil.sabre.Entity
edu.uky.cs.nil.sabre.Character
- All Implemented Interfaces:
Expression, Logical, Parameter, Simplifiable, Typed, Value, Unique, Serializable, Comparable<Logical>
A character is a special
entity that represents an intelligent
being with its own (possibly wrong) beliefs about the world state and its own
utility function that it will attempt to maximize.
The term 'character' is used instead of 'agent' to emphasize that, while
a character's actions need to make sense based on their beliefs and
intentions, they are not actually independent decision-makers. The planner is the only decision-maker, but
it should ensure that characters appear to be acting like independent agents.
Characters are always listed first in Universe.entities so that their
ID numbers correspond to their index in both Universe.entities and
Universe.characters.
- Author:
- Stephen G. Ware
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionApplies a given function to every part of this logical formula and then creates a new logical formula of this same type using the results returned from the function.booleanTests whether this formula is of typecharacter.Returns an expression which represents a character's beliefs about this expression.simplify()Returns a logically equivalent but smaller, simpler, or more convenient form of this logical formula.Methods inherited from class Entity
compareTo, hashCode, is, isBoolean, isEntity, isNumber, toStringMethods inherited from class Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface Expression
mustBeValued, negate, toEffect, toPreconditionMethods inherited from interface Logical
collect, collect, collect, distinguish, find, find, find, mustBeGround, occurs, substitute, substituteMethods inherited from interface Typed
mustBe, mustBeBoolean, mustBeCharacter, mustBeEntity, mustBeNumber, mustNotBe, mustNotBeBoolean, mustNotBeCharacter, mustNotBeEntity, mustNotBeNumber
-
Method Details
-
apply
Description copied from interface:LogicalApplies a given function to every part of this logical formula and then creates a new logical formula of this same type using the results returned from the function. If, for every part of this formula, the function always returns its input as output with no changes, this method should return this object (not just any object that isequal tothis object).- Specified by:
applyin interfaceExpression- Specified by:
applyin interfaceLogical- Specified by:
applyin interfaceParameter- Specified by:
applyin interfaceSimplifiable- Specified by:
applyin interfaceValue- Overrides:
applyin classEntity- Parameters:
function- the function to apply to all parts of this formula- Returns:
- a logical formula of the same type as this formula made from the returned objects, or this object if no parts were changed by the function
-
isCharacter
public boolean isCharacter()Description copied from interface:TypedTests whether this formula is of typecharacter.- Specified by:
isCharacterin interfaceTyped- Overrides:
isCharacterin classEntity- Returns:
- true if the formula is of type character, false otherwise
-
simplify
Description copied from interface:SimplifiableReturns a logically equivalent but smaller, simpler, or more convenient form of this logical formula.- Specified by:
simplifyin interfaceExpression- Specified by:
simplifyin interfaceParameter- Specified by:
simplifyin interfaceSimplifiable- Specified by:
simplifyin interfaceValue- Overrides:
simplifyin classEntity- Returns:
- a smaller, simpler, or more convenient logical formula which is equivalent to this formula
-
evaluate
Description copied from interface:Expression -
prepend
Description copied from interface:ExpressionReturns an expression which represents a character's beliefs about this expression.- Specified by:
prependin interfaceExpression- Specified by:
prependin interfaceParameter- Specified by:
prependin interfaceValue- Overrides:
prependin classEntity- Parameters:
character- the character whose beliefs will be represented- Returns:
- an expression representing the character's beliefs about this expression
-