On this page:
4.1 Hash Actions
hash-action?
hash-action
hash-action-requirements
hash-action-required-keys
hash-action-required-values
hash-action-obstructions
hash-action-obstructing-keys
hash-action-obstructing-values
hash-action-additions
hash-action-deletions
4.2 Hash Conditions
hash-condition?
4.3 Hash Planning Problems
hash-planning-problem?
8.12

4 The Hash State Representation🔗ℹ

In the hash state representation, the world is represented by a hash table. Actions and goals are represented by hash actions and hash conditions.

4.1 Hash Actions🔗ℹ

 (require planning/hash/action) package: planning

A hash action is an action on hash tables. Hash actions have several components, broadly grouped into preconditions and effects. The preconditions of a hash action are:

All of a hash action’s preconditions must be satisfied for the action to be applicable. In that case, the effects of applying the action are defined by:

procedure

(hash-action? v)  boolean?

  v : any/c
A predicate for hash actions.

procedure

(hash-action [#:requirements requirements 
  #:required-keys required-keys 
  #:required-values required-values 
  #:obstructions obstructions 
  #:obstructing-keys obstructing-keys 
  #:obstructing-values obstructing-values 
  #:additions additions 
  #:deletions deletions]) 
  hash-action?
  requirements : multidict? = empty-multidict
  required-keys : set? = empty-set
  required-values : set? = empty-set
  obstructions : multidict? = empty-multidict
  obstructing-keys : set? = empty-set
  obstructing-values : set? = empty-set
  additions : immutable-hash? = empty-hash
  deletions : set? = empty-set
Constructs a hash action.

procedure

(hash-action-requirements action)  multidict?

  action : hash-action?
Returns the requirements of action. See the definition of hash actions for an explanation.

procedure

(hash-action-required-keys action)  set?

  action : hash-action?
Returns the required keys of action. See the definition of hash actions for an explanation.

procedure

(hash-action-required-values action)  set?

  action : hash-action?
Returns the required values of action. See the definition of hash actions for an explanation.

procedure

(hash-action-obstructions action)  multidict?

  action : hash-action?
Returns the obstructions of action. See the definition of hash actions for an explanation.

procedure

(hash-action-obstructing-keys action)  set?

  action : hash-action?
Returns the obstructing keys of action. See the definition of hash actions for an explanation.

procedure

(hash-action-obstructing-values action)  set?

  action : hash-action?
Returns the obstructing values of action. See the definition of hash actions for an explanation.

procedure

(hash-action-additions action)  immutable-hash?

  action : hash-action?
Returns the additions of action. See the definition of hash actions for an explanation.

procedure

(hash-action-deletions action)  set?

  action : hash-action?
Returns the deletions of action. See the definition of hash actions for an explanation.

4.2 Hash Conditions🔗ℹ

 (require planning/hash/condition) package: planning

A hash condition is a condition in the hash state representation.

procedure

(hash-condition? v)  boolean?

  v : any/c
A predicate for hash goals.

4.3 Hash Planning Problems🔗ℹ

 (require planning/hash/problem) package: planning

A hash planning problem is a combination of a hash table representing an initial state, a set of hash actions, and a goal hash condition. A solution to the problem is a list of actions to perform that will transform the hash table into a hash table that satisfies the goal condition.

procedure

(hash-planning-problem? v)  boolean?

  v : any/c
A predicate for hash planning problems.