Question: Part-3 (HumanPlayl You are required to write a program that accepts the initial board state and the goal state for an 8-puzzle problem. Give the
Part-3 (HumanPlayl You are required to write a program that accepts the initial board state and the goal state for an 8-puzzle problem. Give the initial state of the puzzle: Give Tile numbers 8-8 in any order (separated by space): 4 1 2 5 @ 3 7 8 6 Give the goal state of the puzzle: Give Tile numbers 0-8 in any order (separated by space): 1 2 3 4 5 6 7 8 Example Run: Goal State of the Board: 1 2 3 4 5 6 78 Initial State of the Board: 4 1 2 5 @ 3 78 6 Your program should prompt the user to enter the required actions as U or D or Lor R (which stands for move the space up, down, left or right in that order) The program should print the board after each actions, and finally determine whether the goal is reached. Example Run: Give your move (like u or D or L or R): 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
