SlideShare une entreprise Scribd logo
1  sur  78
Télécharger pour lire hors ligne
AI Heuristic Search
Beam Search - Simulated Annealing
MENOUFIA UNIVERSITY
FACULTY OF COMPUTERS AND INFORMATION
ALL DEPARTMENTS
ARTIFICIAL INTELLIGENCE
‫المنوفية‬ ‫جامعة‬
‫والمعلومات‬ ‫الحاسبات‬ ‫كلية‬
‫األقسام‬ ‫جميع‬
‫الذكاء‬‫اإلصطناعي‬
‫المنوفية‬ ‫جامعة‬
Ahmed Fawzy Gad
ahmed.fawzy@ci.menofia.edu.eg
Beam Search
Hill Climbing Vs. Beam Search
• Hill climbing just explores all nodes in one branch until goal found or
not being able to explore more nodes.
• Beam search explores more than one path together. A factor k is used
to determine the number of branches explored at a time.
• If k=2, then two branches are explored at a time. For k=4, four
branches are explored simultaneously.
• The branches selected are the best branches based on the used
heuristic evaluation function.
Beam Search, k=2
Goal – Node K a ---
Current Children
Beam Search
Goal – Node K a ---
Current Children
a
Beam Search
Goal – Node K a ---
Current Children
a
a
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
a
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
aBest k
Successors
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
aBest k
Successors
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓
Best k
Successors
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓
Best k
Successors
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓
k g
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓
k g
Beam Search
Goal – Node K a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
a
j
𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓
k g
GOAL
Simulated Annealing
Simulated Annealing
Steps
1. Select a start node (root node).
2. Randomly select a child of the current node, calculate a value reflecting
how good such child is like 𝒗𝒂𝒍𝒖𝒆 𝒏𝒐𝒅𝒆 = −𝒉𝒆𝒖𝒓𝒊𝒔𝒕𝒊𝒄(𝒏𝒐𝒅𝒆).
3. Select the child if it is better than the current node. Else try another
child.
A node is better than the current node if 𝚫𝑬 = 𝒗𝒂𝒍𝒖𝒆 𝒏𝒆𝒙𝒕 − 𝒗𝒂𝒍𝒖𝒆 𝒄𝒖𝒓𝒓𝒆𝒏𝒕 > 𝟎.
Else if 𝚫𝑬 < 𝟎, then try to find another child.
4. If the child was not better than the current node then it will be selected
with probability equal to 𝐩 = 𝒆
𝚫𝑬
𝑻
where 𝚫𝑬 = 𝒗𝒂𝒍𝒖𝒆 𝒏𝒆𝒙𝒕 − 𝒗𝒂𝒍𝒖𝒆[𝒄𝒖𝒓𝒓𝒆𝒏𝒕]
𝑻 is a temperature.
5. Stop if no improvement can be found or after a fixed time.
Simulated Annealing
Example – 𝑻=10 a
Current Children
Simulated Annealing
Starting from Node a a
Current Children
Simulated Annealing
Starting from Node a a
Current Children
a
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
𝚫𝐄 > 𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎)
𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒇 𝟕 = −𝟕
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎)
𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒇 𝟕 = −𝟕
𝐯𝐚𝐥𝐮𝐞 𝒂 𝟏𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒂 𝟏𝟎 = −𝟏𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎)
𝚫𝐄 = −𝟕 − −𝟏𝟎 = +𝟑
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒇 𝟕 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎)
𝚫𝐄 = −𝟕 − −𝟏𝟎 = +𝟑
∵ 𝚫𝐄 > 𝟎
∴ 𝒇 𝟕 will be selected with probability 1
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node 𝒆 𝟓 is
better than current node
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node 𝒆 𝟓 is
better than current node
𝚫𝐄 > 𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node𝒆 𝟓is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node𝒆 𝟓is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node 𝒆 𝟓 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒆 𝟓 = −𝟓
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node 𝒆 𝟓 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒆 𝟓 = −𝟓
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒇 𝟕 = −𝟕
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node 𝒆 𝟓 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
𝚫𝐄 = −𝟓 − −𝟕 = +𝟐
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
Check if next node 𝒆 𝟓 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
𝚫𝐄 = −𝟓 − −𝟕 = +𝟐
∵ 𝚫𝐄 > 𝟎
∴ 𝒆 𝟓 will be selected with probability 1
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Check if next node 𝒊 𝟔 is
better than current node
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Check if next node 𝒊 𝟔 is
better than current node
𝚫𝐄 > 𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Check if next node 𝒊 𝟔 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Check if next node 𝒊 𝟔 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓)
𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Check if next node 𝒊 𝟔 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓)
𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒆 𝟓 = −𝟓
𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Check if next node 𝒊 𝟔 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓)
𝚫𝐄 = −𝟔 − −𝟓 = −𝟏
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒆 𝟓 is
better than current node
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
𝚫𝐄 = −𝟓 − −𝟕 = +𝟐
∵ 𝚫𝐄 < 𝟎
∴ 𝒊 𝟔 can be selected with
probability 𝐩 = 𝒆
𝚫𝑬
𝑻
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Check if next node 𝒆 𝟓 is
better than current node
∵ 𝚫𝐄 < 𝟎
∴ 𝒊 𝟔 can be selected with
probability 𝐩 = 𝒆
𝚫𝑬
𝑻
𝐩 = 𝒆
−𝟏
𝟏𝟎= 𝒆
−𝟏
𝟏𝟎=.905
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
Because the only child of 𝒆 𝟓 is 𝒊 𝟔
then it will be selected even if its
probability is not 1.
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Randomly Select a
Child
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
𝚫𝐄 > 𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔)
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔)
𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔)
𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎
𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔)
𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎
𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
𝚫𝐄 = 𝟎 − −𝟔 = +𝟔
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
Check if next node 𝒌 𝟎 is
better than current node
𝚫𝐄 > 𝟎
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔)
𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎
𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
𝚫𝐄 = 𝟎 − −𝟔 = +𝟔
∵ 𝚫𝐄 > 𝟎
∴ 𝒌 𝟎 will be selected with
probability 1
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
k
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
k
Simulated Annealing
a ---
Current Children
a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
f 𝒆 𝟓, 𝒈 𝟑
e 𝒊 𝟔
i 𝒌 𝟎
k
GOAL

Contenu connexe

Tendances

State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and SearchHitesh Mohapatra
 
Game playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphGame playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphSyed Zaid Irshad
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}FellowBuddy.com
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceBharat Bhushan
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptkarthikaparthasarath
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesDr. C.V. Suresh Babu
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AIVishal Singh
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agentsMegha Sharma
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logicAmey Kerkar
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicManjula V
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and LiftingMegha Sharma
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search StrategiesAmey Kerkar
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsNuruzzaman Milon
 
Neuro-fuzzy systems
Neuro-fuzzy systemsNeuro-fuzzy systems
Neuro-fuzzy systemsSagar Ahire
 
Artificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real WorldArtificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real Worldahmad bassiouny
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAsst.prof M.Gokilavani
 
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Abdullah al Mamun
 

Tendances (20)

State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
 
Game playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphGame playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graph
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 
Neuro-fuzzy systems
Neuro-fuzzy systemsNeuro-fuzzy systems
Neuro-fuzzy systems
 
Artificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real WorldArtificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real World
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptx
 
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)
 

Plus de Ahmed Gad

ICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmAhmed Gad
 
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...Ahmed Gad
 
Python for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd EditionPython for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd EditionAhmed Gad
 
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Ahmed Gad
 
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesM.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesAhmed Gad
 
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Ahmed Gad
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Ahmed Gad
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Ahmed Gad
 
Avoid Overfitting with Regularization
Avoid Overfitting with RegularizationAvoid Overfitting with Regularization
Avoid Overfitting with RegularizationAhmed Gad
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleAhmed Gad
 
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisAhmed Gad
 
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepBackpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepAhmed Gad
 
Computer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientComputer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientAhmed Gad
 
Python for Computer Vision - Revision
Python for Computer Vision - RevisionPython for Computer Vision - Revision
Python for Computer Vision - RevisionAhmed Gad
 
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAnime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAhmed Gad
 
Brief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsBrief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsAhmed Gad
 
Operations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleOperations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleAhmed Gad
 
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingMATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingAhmed Gad
 
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...Ahmed Gad
 
Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Ahmed Gad
 

Plus de Ahmed Gad (20)

ICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic Algorithm
 
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
 
Python for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd EditionPython for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd Edition
 
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
 
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesM.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
 
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
 
Avoid Overfitting with Regularization
Avoid Overfitting with RegularizationAvoid Overfitting with Regularization
Avoid Overfitting with Regularization
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step Example
 
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
 
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepBackpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
 
Computer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientComputer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and Gradient
 
Python for Computer Vision - Revision
Python for Computer Vision - RevisionPython for Computer Vision - Revision
Python for Computer Vision - Revision
 
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAnime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
 
Brief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsBrief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNs
 
Operations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleOperations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by Example
 
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingMATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
 
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
 
Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...
 

Dernier

Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 

Dernier (20)

FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 

AI Heuristic Search - Beam Search - Simulated Annealing

  • 1. AI Heuristic Search Beam Search - Simulated Annealing MENOUFIA UNIVERSITY FACULTY OF COMPUTERS AND INFORMATION ALL DEPARTMENTS ARTIFICIAL INTELLIGENCE ‫المنوفية‬ ‫جامعة‬ ‫والمعلومات‬ ‫الحاسبات‬ ‫كلية‬ ‫األقسام‬ ‫جميع‬ ‫الذكاء‬‫اإلصطناعي‬ ‫المنوفية‬ ‫جامعة‬ Ahmed Fawzy Gad ahmed.fawzy@ci.menofia.edu.eg
  • 3. Hill Climbing Vs. Beam Search • Hill climbing just explores all nodes in one branch until goal found or not being able to explore more nodes. • Beam search explores more than one path together. A factor k is used to determine the number of branches explored at a time. • If k=2, then two branches are explored at a time. For k=4, four branches are explored simultaneously. • The branches selected are the best branches based on the used heuristic evaluation function.
  • 4. Beam Search, k=2 Goal – Node K a --- Current Children
  • 5. Beam Search Goal – Node K a --- Current Children a
  • 6. Beam Search Goal – Node K a --- Current Children a a
  • 7. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 a
  • 8. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 aBest k Successors
  • 9. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 aBest k Successors
  • 10. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j
  • 11. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j
  • 12. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j
  • 13. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j 𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎
  • 14. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j 𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎 𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓
  • 15. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j 𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎 𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓 Best k Successors
  • 16. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j 𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎 𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓 Best k Successors
  • 17. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j 𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎 𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓 k g
  • 18. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j 𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎 𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓 k g
  • 19. Beam Search Goal – Node K a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f a j 𝒈 𝟑, 𝒆 𝟓 𝒌 𝟎 𝒌 𝟎, 𝒈 𝟑, 𝒆 𝟓 k g GOAL
  • 21. Simulated Annealing Steps 1. Select a start node (root node). 2. Randomly select a child of the current node, calculate a value reflecting how good such child is like 𝒗𝒂𝒍𝒖𝒆 𝒏𝒐𝒅𝒆 = −𝒉𝒆𝒖𝒓𝒊𝒔𝒕𝒊𝒄(𝒏𝒐𝒅𝒆). 3. Select the child if it is better than the current node. Else try another child. A node is better than the current node if 𝚫𝑬 = 𝒗𝒂𝒍𝒖𝒆 𝒏𝒆𝒙𝒕 − 𝒗𝒂𝒍𝒖𝒆 𝒄𝒖𝒓𝒓𝒆𝒏𝒕 > 𝟎. Else if 𝚫𝑬 < 𝟎, then try to find another child. 4. If the child was not better than the current node then it will be selected with probability equal to 𝐩 = 𝒆 𝚫𝑬 𝑻 where 𝚫𝑬 = 𝒗𝒂𝒍𝒖𝒆 𝒏𝒆𝒙𝒕 − 𝒗𝒂𝒍𝒖𝒆[𝒄𝒖𝒓𝒓𝒆𝒏𝒕] 𝑻 is a temperature. 5. Stop if no improvement can be found or after a fixed time.
  • 22. Simulated Annealing Example – 𝑻=10 a Current Children
  • 23. Simulated Annealing Starting from Node a a Current Children
  • 24. Simulated Annealing Starting from Node a a Current Children a
  • 25. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎
  • 26. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎Randomly Select a Child
  • 27. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎Randomly Select a Child
  • 28. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node
  • 29. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node 𝚫𝐄 > 𝟎
  • 30. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
  • 31. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎)
  • 32. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎) 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒇 𝟕 = −𝟕
  • 33. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎) 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒇 𝟕 = −𝟕 𝐯𝐚𝐥𝐮𝐞 𝒂 𝟏𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒂 𝟏𝟎 = −𝟏𝟎
  • 34. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎) 𝚫𝐄 = −𝟕 − −𝟏𝟎 = +𝟑
  • 35. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒇 𝟕 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 − 𝐯𝐚𝐥𝐮𝐞(𝒂 𝟏𝟎) 𝚫𝐄 = −𝟕 − −𝟏𝟎 = +𝟑 ∵ 𝚫𝐄 > 𝟎 ∴ 𝒇 𝟕 will be selected with probability 1
  • 36. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f
  • 37. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f
  • 38. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑
  • 39. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Randomly Select a Child
  • 40. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Randomly Select a Child
  • 41. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node 𝒆 𝟓 is better than current node
  • 42. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node 𝒆 𝟓 is better than current node 𝚫𝐄 > 𝟎
  • 43. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node𝒆 𝟓is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
  • 44. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node𝒆 𝟓is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
  • 45. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node 𝒆 𝟓 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒆 𝟓 = −𝟓 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕)
  • 46. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node 𝒆 𝟓 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒆 𝟓 = −𝟓 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕) 𝐯𝐚𝐥𝐮𝐞 𝒇 𝟕 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒇 𝟕 = −𝟕
  • 47. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node 𝒆 𝟓 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕) 𝚫𝐄 = −𝟓 − −𝟕 = +𝟐
  • 48. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 Check if next node 𝒆 𝟓 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕) 𝚫𝐄 = −𝟓 − −𝟕 = +𝟐 ∵ 𝚫𝐄 > 𝟎 ∴ 𝒆 𝟓 will be selected with probability 1
  • 49. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e
  • 50. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e
  • 51. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔
  • 52. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Randomly Select a Child
  • 53. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Randomly Select a Child
  • 54. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Check if next node 𝒊 𝟔 is better than current node
  • 55. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Check if next node 𝒊 𝟔 is better than current node 𝚫𝐄 > 𝟎
  • 56. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Check if next node 𝒊 𝟔 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓)
  • 57. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Check if next node 𝒊 𝟔 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓) 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
  • 58. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Check if next node 𝒊 𝟔 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓) 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒆 𝟓 = −𝟓 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
  • 59. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 Check if next node 𝒊 𝟔 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 − 𝐯𝐚𝐥𝐮𝐞(𝒆 𝟓) 𝚫𝐄 = −𝟔 − −𝟓 = −𝟏
  • 60. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒆 𝟓 is better than current node 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒆 𝟓 − 𝐯𝐚𝐥𝐮𝐞(𝒇 𝟕) 𝚫𝐄 = −𝟓 − −𝟕 = +𝟐 ∵ 𝚫𝐄 < 𝟎 ∴ 𝒊 𝟔 can be selected with probability 𝐩 = 𝒆 𝚫𝑬 𝑻 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔
  • 61. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Check if next node 𝒆 𝟓 is better than current node ∵ 𝚫𝐄 < 𝟎 ∴ 𝒊 𝟔 can be selected with probability 𝐩 = 𝒆 𝚫𝑬 𝑻 𝐩 = 𝒆 −𝟏 𝟏𝟎= 𝒆 −𝟏 𝟏𝟎=.905 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔
  • 62. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 Because the only child of 𝒆 𝟓 is 𝒊 𝟔 then it will be selected even if its probability is not 1. f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔
  • 63. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i
  • 64. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i
  • 65. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎
  • 66. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Randomly Select a Child
  • 67. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Randomly Select a Child
  • 68. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node
  • 69. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node 𝚫𝐄 > 𝟎
  • 70. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭)
  • 71. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔)
  • 72. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔) 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎
  • 73. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔) 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔
  • 74. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔) 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔 𝚫𝐄 = 𝟎 − −𝟔 = +𝟔
  • 75. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 Check if next node 𝒌 𝟎 is better than current node 𝚫𝐄 > 𝟎 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝐧𝐞𝐱𝐭 − 𝐯𝐚𝐥𝐮𝐞(𝐜𝐮𝐫𝐫𝐞𝐧𝐭) 𝚫𝐄 = 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 − 𝐯𝐚𝐥𝐮𝐞(𝒊 𝟔) 𝐯𝐚𝐥𝐮𝐞 𝒌 𝟎 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒌 𝟎 = 𝟎 𝐯𝐚𝐥𝐮𝐞 𝒊 𝟔 = −𝐡𝐞𝐮𝐫𝐢𝐬𝐭𝐢𝐜 𝒊 𝟔 = −𝟔 𝚫𝐄 = 𝟎 − −𝟔 = +𝟔 ∵ 𝚫𝐄 > 𝟎 ∴ 𝒌 𝟎 will be selected with probability 1
  • 76. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 k
  • 77. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 k
  • 78. Simulated Annealing a --- Current Children a 𝒇 𝟕, 𝒋 𝟖,𝒃 𝟏𝟎 f 𝒆 𝟓, 𝒈 𝟑 e 𝒊 𝟔 i 𝒌 𝟎 k GOAL