Question
Your task is to build an agent to solve a modifed version of the 8 puzzle problem (called the Expense 8 puzzle problem). The task
Your task is to build an agent to solve a modifed version of the 8 puzzle problem (called the Expense 8 puzzle problem). The task is still to take a 3X3 grid on which 8 tiles have been placed, where you can only move one tile at a time to an adjacent location (as long as it is blank) and figure out the order in which to move the tiles to get it to a desired configuration. However now the number on the tile now also represents the cot of moving that tile (moving the tile marked 6 costs 6). Your program should be called expense_8_puzzle and the command line invocation should follow the following format: expense_8_puzzle.py and are required. can be bfs - Breadth First Search ucs - Uniform Cost Search dfs - Depth First Search dls - Depth Limited Search (Note: Depth Limit will be obtained as a Console Input) [Note: This part is EC for CSE 4308 students] ids - Iterative Deepening Search [Note: This part is EC for CSE 4308 students] greedy - Greedy Seach a* - A* Search (Note: if no is given, this should be the default option) If is given as true, search trace is dumped for analysis in trace--.txt (Note: if is not given, assume it is false) search trace contains: fringe and closed set contents per loop of search(and per iteration for IDS), counts of nodes expanded and nodes Both start file and goal file need to follow the format as shown here: Sample Start file Sample Goal file Your output needs to follow the format given in the example here: For: expense_8_puzzle.py start.txt goal.txt a* true The output should appear as follows: Nodes Popped: 97 Nodes Expanded: 64 Nodes Generated: 173 Max Fringe Size: 77 Solution Found at depth 12 with cost of 63. Steps: Move 7 Left Move 5 Up Move 8 Right Move 7 Down Move 5 Left Move 6 Down Move 3 Right Move 2 Right Move 1 Up Move 4 Up Move 7 Left Move 8 Left In additon, the seach trace should have all the information contained in the file given here. (The format is not important, the information is)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started