Completed: / exercises

HW1: Discrete Planning

Due date: 2026-03-22 23:59.
Recommended Resources:

Cubes

Consider a cube with a different color on each side. We will use the same colors as a Rubik's cube (white opposite yellow, red opposite orange, blue opposite green).
Suppose there are six actions that can be done on the cube.
U = \{Z+, Z-, Y+, Y-, X+, X-\} \\\
Each of them represents a 90 degree rotation on the cube around one of its axes. They are illustrated in the picture below.

Question 1

Answer the questions for the cube system with the action set U described above.
Choose the correct answers
Warning: You have not logged in. You cannot answer.

Question 2

Answer the questions for the cube system with a new type of action.
This action set is U ⨯ ℚ. Recall that is the set of rational numbers.
With these new actions, f(x,(u,q)) will rotate the cube in the direction u by q degrees. So rather than always rotating 90 degrees, the cube can be rotated by any rational number of degrees.
Choose the correct answers
Warning: You have not logged in. You cannot answer.

Question 3

Now suppose that the cube in question is a Rubik's cube.
This action set for this cube is
U_{rubik} = \{Z+, Z-, Y+, Y-, X+, X-, twist\} \\\
The first six actions are the same as they were in U, that is, rotations of the entire cube. The twist action rotates the top row of the cube 90 degrees clockwise (the bottom two rows remain unchanged during this action).
Let the set of goal states be the set of states where each side of the cube consists of squares of all the same color.
Choose the correct answers
Warning: You have not logged in. You cannot answer.

Cost-to-go

The graph below represents a discrete planning problem with the lettered nodes representing
states and the numbers on the edges indicating the cost to move between states.
Let G(x,k) be a comma-delimited string denoting the cost to go to state x on a fixed k-step path from states A,B,C,D,E. Use the symbol X to denote that a fixed k-step path to the goal does not exist.
For example, G(D,1) = X,3,1,X,X. This is because there is an edge from B to D with cost 3, there is an edge from C to D with cost 1, and there is no edge from A, D, or E to E.

Question 4

What is G(E,1)?
Enter your answer as a comma delimited string
Warning: You have not logged in. You cannot answer.

Question 5

What is G(E,2)?
Enter your answer as a comma delimited string
Warning: You have not logged in. You cannot answer.

Question 6

What is G(E,3)?
Enter your answer as a comma delimited string
Warning: You have not logged in. You cannot answer.

Question 7

What is G(C,3)?
Enter your answer as a comma delimited string
Warning: You have not logged in. You cannot answer.
Let G*(x) be a comma-delimited string denoting the cost to go to state x indeterminate length path from states A,B,C,D,E. Use the symbol X to denote that a path to the goal does not exist.
Note: In this exercise, you can either use the provided Python code valit_simple.py from
https://github.com/alexanderjlavalle/RPPL, or write your own in a language of your choice. This code might become useful again in QUIZ1.

Question 8

What is G*(E)?
Enter your answer as a comma delimited string
Warning: You have not logged in. You cannot answer.

Question 9

What is G*(C)?
Enter your answer as a comma delimited string
Warning: You have not logged in. You cannot answer.

Question 10

What is G*(A)?
Enter your answer as a comma delimited string
Warning: You have not logged in. You cannot answer.

Authors

Hannah Erickson
?