Question: ( 1 9 points ) A robot moves around in a grid - like environment on a factory floor as shown below, subject to the
points A robot moves around in a gridlike environment on a factory floor as shown below, subject to the following constraints:
In each move, it can only move one step to the right, OR one step up from one grid point to another.
It has to remain within the mathbf x grid. That is it cannot move off the grid.
Assume that the location of the robot at any moment is represented by a tuple of the form mathbfXmathbfY
a points Recall that the robot can only move one step to the right, or one step up from any location, and it has to remain on the grid. Write two move predicates in Prolog that describe the two possible moves the robot can make at any time. Your move predicates will look like movecurrent location, "type of move", new location : right hand side. Hint: Recall that the Prolog predicate boldsymbolA is boldsymbolBboldsymbol is true only if A has the value mathrmB
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
