Heuristic Search & AI – 3


After finding a heuristic function and an evaluation function, another way for finding the target-state s_{target} is iterative improvement.

These algorithms are able to solve problems where the state space S is continuous. Also when we don’t know the characteristics of the target-state s_{target}, but we have some evaluation function f (potential field) to minimize. These methods scale well to high dimensions where no other methods work. They also don’t require high storage.

  • Steepest Descent (Hill Climbing)
  • We start from the start-state s_{start} and pick the best neighboring state s_1, then, from s_1, pick the best neighboring state s_2 and so on… Until, we reach a state t that is better than all its neighbors. Then we halt.

    hill_climbing(start) 	
    	u = start
    	while true
    		v = minimum valued successor of u
    		if (f(v) >= f(u))
    			return u
    		u = v
    

    However, it may halt at a local minimum.

  • Random Steepest Descent (Random Hill Climbing)
  • Runs Steepest Descent multiple times from random start states.

    random_hill_climbing()
    	min = random node
    	S = a list of random start nodes
    	for each node u in S
    		v = hill_climbing(u)
    		if f(v) < f(min)
    			min = v
    	return min
    

    This algorithm lowers the chances of halting at local minimum.

  • Simulated Annealing
  • From the current state s, it picks the next state u randomly. If u gets us lower heuristic (good), we proceed to u. If not (bad), we are supposed to be at a local minimum. Try to escape the local minimum s with some probability. The more bad u is compared to s, the more likely we’re going to stick with our old state s.

    simulated_annealing(start, schedule) 	
    	u = start
    	for t = 1, 2, ...
    		T = schedule(t)
    		if T = 0
    			return u
    		v = random successor of u
    		delta = f(u) - f(v)
    		if (delta > 0)
    			u = v
    		else
    			u = v with probability e^(delta/T)
    

    The parameter T controls the speed of convergence. schedule should be decreasing to make sure the algorithm is more likely to halt the more it proceeds.

    e^(-x)
    e^(-x)

    This means: escape local minima by allowing some bad moves, but gradually decrease their frequency.

    2 thoughts on “Heuristic Search & AI – 3

    std::cout <<