Data Structure for Predicate in STRIPS Planning System

I have a school project in which I'm to implement a STRIPS planning system for a "Blocks World". I'm sure many here are familiar with this, but essentially, you have three Blocks A, B, C arranged on a table and a robot arm that can perform actions on the blocks:
pickup(X) (pick up block X)
stack(X,Y) (stack block X on block Y)
unstack(X, Y)
putdown(X)

The goal is when given a start state, the robot performs the actions to get the blocks in a goal state.

The states are represented by a set of predicates:
on(X,Y) (block X is on block Y)
clear(X) (block X has no blocks on top of it)
gripping(X) (robot arm holds block X)
etc...

Example:
start state:


A B C
------

goal state:
A
B
C
------

The start_state is represented by predicates:{ontable(A), ontable(B), ontable(C), clear(A), clear(B), clear(C), gripper()}

The goal_state is: {on(A,B), on(B,C)}

In order for the robot to perform pickup(B), it must be verified that in the current state, clear(B) && gripping() is true.

What kind of data structure could I use to represent the predicates in a way that could be stored in an instance of a State class?
Topic archived. No new replies allowed.