Puzzles and Search | Reliable Papers

University of HertfordshireSchool of Computer ScienceDaniel PolaniHatfield, March 5, 2021Theory and Practice of Artificial Intelligence • 2020-2021,Semester BExercise Sheet 2Motto: Puzzles and SearchAssignment 2.1Create a variation of the optimal nim player to address variations of the game rules:• nim_2 or nim_4: a different number of sticks to be taken (up to 2, or up to 4)• nim_last_loses: a different winning condition (whoever takes the last stick, loses)!Assignment 2.2Modify the Hero/Sidekick Problem in terms of state variables, start node, goal node and transitionsto handle 2 heros with 2 sidekicks only.Assignment 2.3∗Formulate the 6-Coins Problem in terms of state variables, start node, goal node and transitionsand write a class that represents it.Assignment 2.4∗∗Consider the setting as in the following figure:Assumptions:1. The road is only wide enough for one car.2. The black cars want to drive to the right.3. The white cars want to drive to the left.4. The niche is one car wide and long and can thus only be occupied by one car.Question: how to arrange the car movements (driving left/right, entering niche or not) so that thecars can pass each other?Can you find the shortest such arrangement?Hint: Plan your state space model carefully. What are the states you wish to distinguish? Whatare the moves you want to explicitly model?