# 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
• This is a good start on the answer. If I were grading it, I would want to see a more formal description of some of the actions. This formulation is not precise enough to be implemented because "the crate" is actually one of two crates (which one are we talking about?). It also lacks a definition of "spot" (in a minimal description, you really only care about whether a crate is "directly below the bananas" or not, so that might be a better choice.) Nov 12, 2019 at 17:30

Initial state: The monkey, the suspended bananas, and two cratesin the room

Goal test: Monkey has bananas.

Successor function: To jump on crate; to jump off crate; Push crate from
One spot to another; Walk from one spot to another;Grab bananas (if standing on crate).

Cost function: Number of actions.