Understanding how states are represented using ground atomic fluents
A state is a complete description of the world at a particular point in time. It captures everything relevant about the current situation that matters for planning.
Example: In a robot world, a state describes where the robot is, what it's holding, where objects are located, which doors are open, etc. β everything the planner needs to know.
A state is like taking a photograph of the world at one moment:
State representation is the formal language or notation we use to describe states. It's HOW we write down and encode the information about the world.
Same state, different representations:
"The robot is in the kitchen."
"The robot is holding a box."
"The book is on the table."
[1, 0, 0, 1, 0, 1, 0, 0, ...]
At(Robot, Kitchen)Holding(Robot, Box)On(Book, Table)
Good representation = faster planning. Set-based representation allows quick membership testing and state comparison.
Logical representation lets us reason about what's true, what's false, and what actions can be applied.
Clear representation makes it easy to compute state transitions: add effects, delete effects, check preconditions.
Watch how representation makes state changes explicit:
At(Robot, Kitchen)Holding(Box)On(Book, Table)
Delete: At(Robot, Kitchen)
Add: At(Robot, Bedroom)
At(Robot, Bedroom) (new)Holding(Box)On(Book, Table)
Let's see how real planning problems are represented as states
A robot needs to pick up a box from a table and move it to a target location.
Holding(Box) is FALSE (not in state)On(Box, Table) is FALSE (removed)Box β Table β TargetRobot β HandYou have a flat tire on your car during a road trip. You need to replace it with the spare tire.
Tire(Flat, Axle) - Location of flat tireTire(Spare, Trunk) - Location of spare| Aspect | Robot Grasping | Tire Replacement |
|---|---|---|
| Number of States | 3 states (Initial, After Grasp, Goal) | 4 states (Initial, 2 Intermediate, Goal) |
| Key Predicates | On(), Holding(), Clear(), Empty(), At() |
Tire(object, location) |
| Number of Objects | 4 objects (Robot, Box, Table, Target) | 5 objects (Flat, Spare, Axle, Trunk, Ground) |
| State Complexity | 3-4 fluents per state | 1-2 fluents per state (simpler!) |
| CWA Applied | If Holding(X) not in state β Robot not holding X |
If Tire(X, Y) not in state β Tire X not at Y |
| UNA Applied | Box β Table β Target (all different) | Flat β Spare, Axle β Trunk β Ground |
Remember knowledge representation from Lecture 7? Planning uses a simplified version!
Father(John)Β¬Hungry(x)βx Human(x) β Mortal(x)
At(Robot, Kitchen)Holding(Box)
The building blocks of planning states
At(Robot, Kitchen) β but not At(Robot, Kitchen) β§ Holding(Box) β
On(Box, Table) β but not On(x, Table) β
At(Robot, Kitchen) can become At(Robot, Bedroom) after an action
Not all predicates are fluents! Some facts about the world never change:
These facts can be modified by actions:
β At(Robot, Kitchen)
Can change to At(Robot, Bedroom)β Holding(Box)
Can become Empty(Hand)β Open(Door1)
Can become Closed(Door1)These facts are fixed properties of the world:
β Adjacent(Kitchen, Bedroom)
Rooms don't move!β Color(Block1, Red)
Block color is fixedβ Distance(Riyadh, Jeddah, 950)
Geography doesn't changePredicate: At
Constants: Robot, Kitchen
Predicate: Holding
Constants: Box
Predicate: On
Constants: Book, Table
Predicate: Clean
Constants: Room1
Predicate: Empty
Constants: Hand
Predicate: At
Constants: Plane, Riyadh
Problem: Contains variable 'x' (not ground)
Problem: Contains quantifier (not atomic)
Problem: Contains negation (use CWA instead!)
Problem: Complex formula (not atomic)
Problem: Contains function (only constants allowed)
Problem: Contains variables x and y (not ground)
Test your understanding! Enter a fluent to check if it's valid:
States as sets of facts (like a database table)
A planning state is represented as a set of ground atomic fluents, just like a database table stores rows of data.
| Predicate | Arguments |
|---|---|
| At | Robot, Kitchen |
| Holding | Box |
| On | Book, Table |
| Clean | Kitchen |
"What is not known to be true is FALSE"
In classical planning, we assume the world is closed: if a fact is not explicitly listed in the state, then it is FALSE. No "unknown" or "maybe"!
| Query | In State? | Truth Value (CWA) |
|---|---|---|
At(Robot, Kitchen) |
β YES | TRUE |
Holding(Box) |
β YES | TRUE |
At(Robot, Bedroom) |
β NO | FALSE (by CWA) |
Clean(Kitchen) |
β NO | FALSE (by CWA) |
Holding(Book) |
β NO | FALSE (by CWA) |
Β¬At(Robot, Bedroom).
Instead, the absence of At(Robot, Bedroom) from the state means it's false!
Assumption: What's not stated is FALSE
State: {At(Robot, Kitchen)}
Query: At(Robot, Bedroom)
Answer: FALSE
Assumption: What's not stated is UNKNOWN
KB: {At(Robot, Kitchen)}
Query: At(Robot, Bedroom)
Answer: UNKNOWN
"Different names refer to different objects"
In classical planning, each constant name refers to a unique object. If two names are different, they refer to different things. No aliases!
At(Robot1, Kitchen)At(Robot2, Bedroom)
Robot1 and Robot2 are different objects. Both can be at different locations simultaneously.
At(Robot, Kitchen)At(Robot, Bedroom)
Robot cannot be in two places at once! This state would be inconsistent.
Riyadh β JeddahRiyadh β DammamPlane1 β Plane2Each name represents exactly one distinct entity.
Riyadh = CapitalCityKeep it simple: one name, one object!
| Criterion | β VALID (Allowed) | β INVALID (Not Allowed) |
|---|---|---|
| Ground |
At(Robot, Kitchen)Only constants |
At(x, Kitchen)Contains variable 'x' |
| Atomic |
Holding(Box)Single predicate |
Holding(Box) β§ Clean(Table)Complex formula with β§ |
| No Negation |
At(Robot, Room1)Positive fact (use CWA for negation) |
Β¬At(Robot, Room2)Explicit negation not allowed |
| No Quantifiers |
Clean(Room1)Clean(Room2)List each fact explicitly |
βx Clean(x)Universal quantifier not allowed |
| No Functions |
At(Robot, Location5)Constants only |
At(Robot, NextRoom(Kitchen))Function symbols not allowed |
At(Plane1, Jeddah) is FALSE (not in state)Planning uses a restricted subset of First-Order Logic (FOL/FOPL):