Question: C++ Solving the 8-puzzels problem using A* search. The three heuristic functions are: g(n) - # of moves from initial state to node n h*(n)

C++

Solving the 8-puzzels problem using A* search. The three heuristic functions are:

g(n) - # of moves from initial state to node n

h*(n) - # of misplaced tiles

f*(n) - g(n) + h*(n)

-------------------------------------------------------

i just need a good A* class with the 3 heuristic functions that are above

The format of input and output are like this:

I. Inputs:

a) inFile1 (use argv [1]) : A file contains 9 numbers, 0 to 8, represents the initial configuration of the 8-puzzel.

b) inFile2 (use argv [2]) : A file contains 9 numbers, 0 to 8, represents the goal configuration of the 8-puzzel.

*******************************

II. Outputs:

a) outFile1: (use argv [3]) : For all intermediate Open list and Close list and expanded child list.

b) outFile2: (use argv [4]): For the display of the sequence of moves from initial state to the goal state.

Make a very nice display from each configuration to next configuration of 8-puzzels.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!