CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering http://www.engr.uconn.edu/~jinbo
Informed search strategies
Random restart – a remedy to the drawbacks
Local beam search
Simulated annealing
Simulated annealing (SA)
Simulated annealing (SA)
Simulated annealing algorithm Example of simulated annealing https://www.youtube.com/watch?v=VWtYLv-4oP0 Example codes http://www.theprojectspot.com/tutorial-post/simulated-annealing-algorithm-for-beginners/6
Simulated annealing example h = 1, t=1, T = T0/2 = 50 Because T ~= 0, so Next = a random move Δ E = E1 – E0 = 1 If Δ E < 0, Current = Next Else compute p = e (- Δ E/T) =0.98 Generate a random number r from a uniform [0,1] Assume r = 0.8 Then, Current = Next Initial state T0 = 100 Annealing schedule is T T/2
Simulated annealing example h = 1, t=1, T = T0/2 = 50 Because T ~= 0, so Next = a random move Δ E = E1 – E0 = 1 If Δ E < 0, Current = Next Else compute p = e (- Δ E/T) =0.98 Generate a random number r from a uniform [0,1] Assume r = 0.8 Then, Current = Next Initial state T0 = 100 Annealing schedule is T T/2
Simulated annealing (variant) Another annealing scheduling
Genetic algorithms
Genetic algorithms
Representation: strings of genes
Encoding of a chromosome
Example: genetic algorithms for drive train
Operations: crossover
Operations: mutation
The basic genetic algorithm A short video explains GA in 3 minutes https://www.youtube.com/watch?v=ejxfTy4lI6I
Genetic algorithm: 8-queens
Game playing and adversarial search
Games If possible, we can talk about minimax rule and search
Motivation
The simplest game environment
Other properties of the simplest games
More complicated games
Formalizing the game setup
How to play a game by searching
Game trees
Game trees
Hexapawn: three possible first moves
Hexapawn: three possible first moves
MAX & MIN nodes: an egocentric view
Evaluation functions: f(n)
A partial game tree for Tic-Tac-Toe
The Minimax rule
The minimax rule Don’t play hope chess
The minimax procedure
2-ply Minimax example
What if MIN does not play optimally?
Comments on Minimax search
Questions?