Question: Artificial Intelligence Problem PLEASE ANSWER ALL PARTS WITH FULL EXPLANATIONS Consider the milk-can transfer problem shown in class. (Briefly: there are two 40- quart cans,
Artificial Intelligence Problem
PLEASE ANSWER ALL PARTS WITH FULL EXPLANATIONS
Consider the "milk-can transfer" problem shown in class. (Briefly: there are two 40- quart cans, both full; one empty five-quart can; and one empty four-quart can. Your job is to transfer milk between the cans without spilling until there are two quarts in each of the smaller cans.) 5.1 (5 pts) With as much accuracy as you can, calculate the size of the problem space for this problem. (Or, to put it another way: how many distinct achievable states are there?) 5.2 (45 pts) Write, in whatever language you prefer, a depth-first search algorithm that solves the milk-transfer puzzle and show a well-documented printout of your program and solution. Try to experiment with variations on the basic DFS algorithm shown in class: for instance, you might want to experiment with a version that maintains both an "open" and "closed" (i.e., "already-tested") list of nodes. Consider the "milk-can transfer" problem shown in class. (Briefly: there are two 40- quart cans, both full; one empty five-quart can; and one empty four-quart can. Your job is to transfer milk between the cans without spilling until there are two quarts in each of the smaller cans.) 5.1 (5 pts) With as much accuracy as you can, calculate the size of the problem space for this problem. (Or, to put it another way: how many distinct achievable states are there?) 5.2 (45 pts) Write, in whatever language you prefer, a depth-first search algorithm that solves the milk-transfer puzzle and show a well-documented printout of your program and solution. Try to experiment with variations on the basic DFS algorithm shown in class: for instance, you might want to experiment with a version that maintains both an "open" and "closed" (i.e., "already-tested") list of nodes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
