Question: Intro. To AI Lab 8: Hill Climb Algorithm In this lab you'll be implementing a Hill Climb algorithm on a very simple Graph. Hill

""" Intro. To AI

Lab 8: Hill Climb Algorithm

In this lab you'll be implementing a Hill Climb algorithm on a very simple Graph.

Hill climb is a heurisitc search used for mathematical optimization problems in the field of Artificial Intelligence. Given a large set of inputs and a good heuristic function, it tried to find a sufficiently good solution to the problem. This solution may not be the global maximum.

In this lab you'll be implementing a basic version of the algorithm on a graph. You can create a new graph.py file if you like

In this task you will create a function named hill_climb_search() that will take in the graph along with the start and the goal node. The function will print the path it took after reaching the goal node.

The graph that you will work on is as follows, where the representation includes the node and the heuristic of that (node, heuristic):

# A is the root node with B, C, D as successors (A,3) -> (B, 4), (C, 6), (D, 5) (B,4) -> (E, 3), (F, 2) (C,6) -> (G, 7), (H, 8) (D,5) -> (I, 6), (J, 7) (H,8) -> (K, 9)

Solution: A -> C -> H -> K

Initial node to start is "A" and the goal node is "K" """

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 Databases Questions!