How can I solve part b of exercise 3.6 from the book "Artificial Intelligence: A Modern Approach"? I am trying to solve part b of the exercise 3.6 (page 113) from the book Artificial Intelligence: A Modern Approach.
More specifically, I need to give a complete problem formulation (that is precise enough to be implemented) for the following problem.

A 3-foot-tall monkey is in a room where some bananas are suspended from the 8-foot ceiling. He would like to get the bananas. The room contains two stackable, movable, climbable 3-foot-high crates.
Give the initial state, goal test, successor function, and cost function for each of the following. Choose a formulation that is precise enough to be implemented.
Initial state: initial position of the monkey.
Possible actions


climb on the crate, 
get down the crate, 
move the crate from one spot to another, 
stack one crate on another, 
walk from one spot to another,
grab bananas (if standing on the crate)

Goal test: did the monkey get the bananas?
Cost function: the number of actions completed