CS475 - Project 1 1. This project worths 10 points (1/3 of the grade of projects/homework) 2. Purpose: The purpose of this project is for you to gain some experience on implementing a search algorithm. We will implement the A* search algorithm to solve the 8-puzzle using one of the heuristic functions (h1 or h2) defined in Page 102 of the text-book. It is said that using the 'city block distance' heuristic will yield better performance. Thus I encourage you to use h2. 3. The following program description is meant to help you in developing your program. You DO NOT NEED TO FOLLOW it if you have another (or better) idea on how to program it. * Data structure: You need to have a data structure to represent the board. A number of different representations can be used here: a 3x3 matrix, an array of 9 elements, a link list etc. Select the representation which will make your life easier! * Operators: There are different views on what an operator can be in this game. For example, I would say that moving a tile to a free place is an operator. In this case, we would have four operators: LEFT, RIGHT, UP, DOWN. You might disagree with it and have your own idea regarding what the operators ought to be. Whatever you decide is fine! BUT do the following: a. List the operators you will immplement b. Describe the effects of each operator using an example. For instance, the effect of the LEFT operator can be given in the following example BEFORE AFTER 1 2 3 1 2 3 4 5 4 5 6 7 8 6 7 8 c. Implement each operator in one module if you are using C, C++, or JAVA * Implement a module for computing the heuristic function * The input of the program will consist of the initial state and the goal state given in the following form 1 2 3 4 free 5 6 7 8 1 2 3 4 5 free 6 7 8 or 1 2 3 4 0 5 6 7 8 1 2 3 4 5 0 6 7 8 and it should return a sequence of operators as output. (If you do not use C, C++, JAVA, please specify your representation of the input and output) 4. Submision procedure: submit the executable and the source of your program in the language of your choice (C, C++, JAVA, PROLOG, etc.) on a diskette, a printout of your program, and a short desciprition of the program containing the following infos: a. How to compile? b. How to run (what is the input and what is the output)? c. A document on the program Grading: 0. Compile error 0 point ---- DO NOT SUBMIT ANYTHING THAT DOES NOT WORK --- The project will be graded as follows: What will be graded Point Where will I look for it ? 1. Description of the data structure 1 point (c) and the algorithm 2. Compile OK 1 point (a) 3. Operators description, input and 2 points (c) output represenation) 4. Program documentation (comments, 2 points (source) modules for operators, module for heuristic evaluation, module for search) 5. Correctness of the search algorithm 4 points (a & b) (need to return correct results for four test cases) Time: 3 weeks (Due: Thursday, March 8)