Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Input and output files: Your program will read in the values for the initial state and goal state from a text file that contains 2
Input and output files: Your program will read in the values for the initial state and goal state from a text file that contains lines as shown in Figure below. Lines to contain the tile patterns for the three layers of the initial state, with the layers separated by blank lines. Line is a blank line. Lines to contain the three layers of the goal state, with the layers separated by blank lines. n and m are integers that range from to representing the blank position and the tile numbers
Your program will produce an output file that contains lines as shown in Figure below. Lines to contain the tile patterns for the initial state and goal state. You can simply copy lines to from the input file to the output file. Line is a blank line. Line is the depth level d of the
CS Fall
Project : Puzzle Problem E K Wong
shallowest goal node as found by the A algorithm assume the root node is at level Line is the total number of nodes N generated in your tree including the root node. Line contains the solution a sequence of actions from root node to goal node represented by As The As are separated by blank spaces. Each A is a character from the set E W N S U D representing the East, West, North, South, Up and Down movements of the blank position. Line contains the fn values of the nodes along the solution path, from the root node to the goal node, separated by blank spaces. There should be d number of A values in line and d number of f values in line
Testing your program: Three input files will be provided on Brightspace for you to test your program. All input files are solvable; ie they have solutions.
Recommended languages: Python, CC or Java. If you would like to use a different language, send me an email first.
Submit on Brightspace:
Your source code file. Put comments in your source code to make it easier for someone else to read your program. Points will be taken off if you do not have comments in your source code.
The output files generated by your program for the input test files.
A PDF file that contains instructions on how to run your program. If your program requires compilation, instructions on how to compile your program should also be provided. Also, copy and paste your outputs and your source code onto the PDF file to make it easier for us to grade your project. This is in addition to the source code file and output files that you have to hand in separately, as described in items and above.
If you work in a team of two, only one partner needs to submit but please write both partners names on the source code and the PDF report.
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