SlideShare a Scribd company logo
Simulated Annealing
Classical Search 
• Observable 
• Deterministic 
• Known Environment 
• Solution of sequence of actions
Local Search 
• All that matters is the solution state 
• Don't care about solution path
Advantages of Local Search 
• Very little memory — usually constant amount 
• Can often find reasonable solutions in infinite (continuous) 
state spaces
Steepest Ascent Hill 
Climbing 
(a.k.a. greedy local search)
Hill Climbing 
1. Pick a random point. 
2. Look at your neighbors. 
3. Keep going up until you find the 
local maximum.
Hill Climbing & 8-Queens 
• Gets stuck 86% of the time 
• avg 3 steps when it gets stuck 
• avg 4 steps to solve optimally
Hill Climbing with Sidesteps 
• Gets stuck only 6% of the time on 8-queens 
• avg 64 steps when it gets stuck 
• avg 21 steps to solve optimally
Random-restart hill climbing 
• expected restarts = 1/p, p is the probability of success 
• expected steps = 1 successful iteration + cost of (1-p)/p cost 
of failure, roughly 22 steps 
• even for 3 Million-Queens finds a solution in under 1 minute
Simulated Annealing
Metallurgy 
Annealing is the process used to temper or harden metals 
and glass by heating them to a high temperature and then 
gradually cooling them, thus allowing the material to reach a 
low-energy crystalline state.
Simulated Annealing 
1. Choose a random initial state, high initial temperature, and 
cooling rate 
2. Choose random neighbor of current state 
3. If it's better than the current state, pick it 
4. If not, randomly decide to take it anyway based on 
temperature 
5. Reduce temperature 
6. Repeat steps 2-5 until cooled
// Loop until system has cooled 
while (temp > 1) { 
Tour newSolution = randomNeighbor(currentSolution); 
// Get energy of solutions 
int currentEnergy = currentSolution.getDistance(); 
int neighbourEnergy = newSolution.getDistance(); 
// Decide if we should accept the neighbour 
if (acceptanceProbability(currentEnergy, neighbourEnergy, temp) > Math.random()) { 
currentSolution = new Tour(newSolution.getTour()); 
} 
// Keep track of the best solution found 
if (currentSolution.getDistance() < best.getDistance()) { 
best = new Tour(currentSolution.getTour()); 
} 
// Cool system 
temp *= 1-coolingRate; 
}
Choosing Cooling Rate 
• No silver bullet. 
• Picking a high temperature and low cooling rate is generally 
best.
Advantages of Simulated 
Annealing 
• can deal with arbitrary systems and cost functions 
• is relatively easy to code, even for complex problems 
• generally gives a "good" solution
Complete? 
NO
Optimal? 
With loose enough 
cooling schedule
Time Complexity 
O(1)
Space Complexity 
O(1)

More Related Content

What's hot

Simulated Annealing
Simulated AnnealingSimulated Annealing
Simulated Annealingguestead520
 
Simulated annealing-global optimization algorithm
Simulated annealing-global optimization algorithmSimulated annealing-global optimization algorithm
Simulated annealing-global optimization algorithmAkhil Prabhakar
 
Simulated annealing -a informative approach
Simulated annealing -a informative approachSimulated annealing -a informative approach
Simulated annealing -a informative approachRanak Ghosh
 
Simulated Annealing
Simulated AnnealingSimulated Annealing
Simulated AnnealingJoy Dutta
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithmMegha Sharma
 
Reinforcement Learning Q-Learning
Reinforcement Learning   Q-Learning Reinforcement Learning   Q-Learning
Reinforcement Learning Q-Learning Melaku Eneayehu
 
Optimization for Deep Learning
Optimization for Deep LearningOptimization for Deep Learning
Optimization for Deep LearningSebastian Ruder
 
Multi armed bandit
Multi armed banditMulti armed bandit
Multi armed banditJie-Han Chen
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp) Archana432045
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}FellowBuddy.com
 
Reinforcement learning
Reinforcement learning Reinforcement learning
Reinforcement learning Chandra Meena
 
Multi-armed Bandits
Multi-armed BanditsMulti-armed Bandits
Multi-armed BanditsDongmin Lee
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement LearningSalem-Kabbani
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search techniqueKapil Dahal
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learningSubrat Panda, PhD
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligencesandeep54552
 
Particle swarm optimization
Particle swarm optimization Particle swarm optimization
Particle swarm optimization Ahmed Fouad Ali
 

What's hot (20)

Simulated Annealing
Simulated AnnealingSimulated Annealing
Simulated Annealing
 
Simulated annealing-global optimization algorithm
Simulated annealing-global optimization algorithmSimulated annealing-global optimization algorithm
Simulated annealing-global optimization algorithm
 
Simulated annealing -a informative approach
Simulated annealing -a informative approachSimulated annealing -a informative approach
Simulated annealing -a informative approach
 
Simulated Annealing
Simulated AnnealingSimulated Annealing
Simulated Annealing
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithm
 
Reinforcement Learning Q-Learning
Reinforcement Learning   Q-Learning Reinforcement Learning   Q-Learning
Reinforcement Learning Q-Learning
 
Optimization for Deep Learning
Optimization for Deep LearningOptimization for Deep Learning
Optimization for Deep Learning
 
Multi armed bandit
Multi armed banditMulti armed bandit
Multi armed bandit
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
Nature-inspired algorithms
Nature-inspired algorithmsNature-inspired algorithms
Nature-inspired algorithms
 
Reinforcement learning
Reinforcement learning Reinforcement learning
Reinforcement learning
 
Multi-armed Bandits
Multi-armed BanditsMulti-armed Bandits
Multi-armed Bandits
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Uncertainty in AI
Uncertainty in AIUncertainty in AI
Uncertainty in AI
 
Particle swarm optimization
Particle swarm optimization Particle swarm optimization
Particle swarm optimization
 

Viewers also liked

Simulated annealing
Simulated annealing Simulated annealing
Simulated annealing Hamid Reza
 
Metaheurística Simulated Annealing
Metaheurística Simulated AnnealingMetaheurística Simulated Annealing
Metaheurística Simulated AnnealingMarcos Castro
 
Stochastic Approximation and Simulated Annealing
Stochastic Approximation and Simulated AnnealingStochastic Approximation and Simulated Annealing
Stochastic Approximation and Simulated AnnealingSSA KPI
 
Practical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningPractical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningGuido Governatori
 
Comparative study of graph partitioning algorithms
Comparative study of graph partitioning algorithmsComparative study of graph partitioning algorithms
Comparative study of graph partitioning algorithmsTanvi Prabhu Dessai
 
Instrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMYInstrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMYklirantga
 
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)Federico Cerutti
 
Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...
Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...
Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...healthdata be
 
Lecture 27 simulated annealing
Lecture 27 simulated annealingLecture 27 simulated annealing
Lecture 27 simulated annealingHema Kashyap
 
spsann - optimization of sample patterns using spatial simulated annealing
spsann - optimization of sample patterns using  spatial simulated annealingspsann - optimization of sample patterns using  spatial simulated annealing
spsann - optimization of sample patterns using spatial simulated annealingAlessandro Samuel-Rosa
 
L1 theory behind research methods
L1 theory behind research methodsL1 theory behind research methods
L1 theory behind research methodsIsabel Avendaño
 
Artificial intelligence - TSP
Artificial intelligence - TSP Artificial intelligence - TSP
Artificial intelligence - TSP Tung Le
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial IntelligenceBise Mond
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmPintu Khan
 
Wireless mesh network (2)
Wireless mesh network (2)Wireless mesh network (2)
Wireless mesh network (2)Jyoti Yadav
 
Clustering:k-means, expect-maximization and gaussian mixture model
Clustering:k-means, expect-maximization and gaussian mixture modelClustering:k-means, expect-maximization and gaussian mixture model
Clustering:k-means, expect-maximization and gaussian mixture modeljins0618
 

Viewers also liked (18)

Simulated annealing
Simulated annealing Simulated annealing
Simulated annealing
 
Metaheurística Simulated Annealing
Metaheurística Simulated AnnealingMetaheurística Simulated Annealing
Metaheurística Simulated Annealing
 
Artificial intel
Artificial intelArtificial intel
Artificial intel
 
Stochastic Approximation and Simulated Annealing
Stochastic Approximation and Simulated AnnealingStochastic Approximation and Simulated Annealing
Stochastic Approximation and Simulated Annealing
 
Practical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningPractical Non-Monotonic Reasoning
Practical Non-Monotonic Reasoning
 
Comparative study of graph partitioning algorithms
Comparative study of graph partitioning algorithmsComparative study of graph partitioning algorithms
Comparative study of graph partitioning algorithms
 
Instrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMYInstrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMY
 
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
Cerutti--Introduction to Argumentation (seminar @ University of Aberdeen)
 
Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...
Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...
Guest lecture Programme in the Methods of Health Economics (Abteilung für Ges...
 
Lecture 27 simulated annealing
Lecture 27 simulated annealingLecture 27 simulated annealing
Lecture 27 simulated annealing
 
spsann - optimization of sample patterns using spatial simulated annealing
spsann - optimization of sample patterns using  spatial simulated annealingspsann - optimization of sample patterns using  spatial simulated annealing
spsann - optimization of sample patterns using spatial simulated annealing
 
L1 theory behind research methods
L1 theory behind research methodsL1 theory behind research methods
L1 theory behind research methods
 
Artificial intelligence - TSP
Artificial intelligence - TSP Artificial intelligence - TSP
Artificial intelligence - TSP
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Chapter 2 (final)
Chapter 2 (final)Chapter 2 (final)
Chapter 2 (final)
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic Algorithm
 
Wireless mesh network (2)
Wireless mesh network (2)Wireless mesh network (2)
Wireless mesh network (2)
 
Clustering:k-means, expect-maximization and gaussian mixture model
Clustering:k-means, expect-maximization and gaussian mixture modelClustering:k-means, expect-maximization and gaussian mixture model
Clustering:k-means, expect-maximization and gaussian mixture model
 

Similar to Simulated Annealing

Simulated_Annealing.pptx
Simulated_Annealing.pptxSimulated_Annealing.pptx
Simulated_Annealing.pptxssuserc755f1
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.pptGauravWani20
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.pptjpradha86
 
Chap 4 local_search
Chap 4 local_search Chap 4 local_search
Chap 4 local_search Rakhi Gupta
 
Heuristic approach optimization
Heuristic  approach optimizationHeuristic  approach optimization
Heuristic approach optimizationAng Sovann
 
Simulated annealing presentation
Simulated annealing presentation Simulated annealing presentation
Simulated annealing presentation AmarendraKrSaroj
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptkarthikaparthasarath
 
SimulatedAnnealing.ppt
SimulatedAnnealing.pptSimulatedAnnealing.ppt
SimulatedAnnealing.pptVivekChawla19
 
Optimization
OptimizationOptimization
Optimizationyesheeka
 

Similar to Simulated Annealing (11)

Simulated_Annealing.pptx
Simulated_Annealing.pptxSimulated_Annealing.pptx
Simulated_Annealing.pptx
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.ppt
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.ppt
 
Chap 4 local_search
Chap 4 local_search Chap 4 local_search
Chap 4 local_search
 
cs-171-05-LocalSearch.pptx
cs-171-05-LocalSearch.pptxcs-171-05-LocalSearch.pptx
cs-171-05-LocalSearch.pptx
 
Heuristic approach optimization
Heuristic  approach optimizationHeuristic  approach optimization
Heuristic approach optimization
 
Lec 6 bsc csit
Lec 6 bsc csitLec 6 bsc csit
Lec 6 bsc csit
 
Simulated annealing presentation
Simulated annealing presentation Simulated annealing presentation
Simulated annealing presentation
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
SimulatedAnnealing.ppt
SimulatedAnnealing.pptSimulatedAnnealing.ppt
SimulatedAnnealing.ppt
 
Optimization
OptimizationOptimization
Optimization
 

More from Jason Larsen

Unidirectional Data Flow with Reactor
Unidirectional Data Flow with ReactorUnidirectional Data Flow with Reactor
Unidirectional Data Flow with ReactorJason Larsen
 
Unidirectional Data Flow in Swift
Unidirectional Data Flow in SwiftUnidirectional Data Flow in Swift
Unidirectional Data Flow in SwiftJason Larsen
 
Protocol Oriented JSON Parsing in Swift
Protocol Oriented JSON Parsing in SwiftProtocol Oriented JSON Parsing in Swift
Protocol Oriented JSON Parsing in SwiftJason Larsen
 
Data Pipelines in Swift
Data Pipelines in SwiftData Pipelines in Swift
Data Pipelines in SwiftJason Larsen
 
7 Habits For a More Functional Swift
7 Habits For a More Functional Swift7 Habits For a More Functional Swift
7 Habits For a More Functional SwiftJason Larsen
 
Learn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great GoodLearn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great GoodJason Larsen
 

More from Jason Larsen (6)

Unidirectional Data Flow with Reactor
Unidirectional Data Flow with ReactorUnidirectional Data Flow with Reactor
Unidirectional Data Flow with Reactor
 
Unidirectional Data Flow in Swift
Unidirectional Data Flow in SwiftUnidirectional Data Flow in Swift
Unidirectional Data Flow in Swift
 
Protocol Oriented JSON Parsing in Swift
Protocol Oriented JSON Parsing in SwiftProtocol Oriented JSON Parsing in Swift
Protocol Oriented JSON Parsing in Swift
 
Data Pipelines in Swift
Data Pipelines in SwiftData Pipelines in Swift
Data Pipelines in Swift
 
7 Habits For a More Functional Swift
7 Habits For a More Functional Swift7 Habits For a More Functional Swift
7 Habits For a More Functional Swift
 
Learn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great GoodLearn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great Good
 

Recently uploaded

Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 

Recently uploaded (20)

Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

Simulated Annealing

  • 2. Classical Search • Observable • Deterministic • Known Environment • Solution of sequence of actions
  • 3. Local Search • All that matters is the solution state • Don't care about solution path
  • 4. Advantages of Local Search • Very little memory — usually constant amount • Can often find reasonable solutions in infinite (continuous) state spaces
  • 5. Steepest Ascent Hill Climbing (a.k.a. greedy local search)
  • 6. Hill Climbing 1. Pick a random point. 2. Look at your neighbors. 3. Keep going up until you find the local maximum.
  • 7. Hill Climbing & 8-Queens • Gets stuck 86% of the time • avg 3 steps when it gets stuck • avg 4 steps to solve optimally
  • 8. Hill Climbing with Sidesteps • Gets stuck only 6% of the time on 8-queens • avg 64 steps when it gets stuck • avg 21 steps to solve optimally
  • 9. Random-restart hill climbing • expected restarts = 1/p, p is the probability of success • expected steps = 1 successful iteration + cost of (1-p)/p cost of failure, roughly 22 steps • even for 3 Million-Queens finds a solution in under 1 minute
  • 11. Metallurgy Annealing is the process used to temper or harden metals and glass by heating them to a high temperature and then gradually cooling them, thus allowing the material to reach a low-energy crystalline state.
  • 12. Simulated Annealing 1. Choose a random initial state, high initial temperature, and cooling rate 2. Choose random neighbor of current state 3. If it's better than the current state, pick it 4. If not, randomly decide to take it anyway based on temperature 5. Reduce temperature 6. Repeat steps 2-5 until cooled
  • 13.
  • 14. // Loop until system has cooled while (temp > 1) { Tour newSolution = randomNeighbor(currentSolution); // Get energy of solutions int currentEnergy = currentSolution.getDistance(); int neighbourEnergy = newSolution.getDistance(); // Decide if we should accept the neighbour if (acceptanceProbability(currentEnergy, neighbourEnergy, temp) > Math.random()) { currentSolution = new Tour(newSolution.getTour()); } // Keep track of the best solution found if (currentSolution.getDistance() < best.getDistance()) { best = new Tour(currentSolution.getTour()); } // Cool system temp *= 1-coolingRate; }
  • 15. Choosing Cooling Rate • No silver bullet. • Picking a high temperature and low cooling rate is generally best.
  • 16. Advantages of Simulated Annealing • can deal with arbitrary systems and cost functions • is relatively easy to code, even for complex problems • generally gives a "good" solution
  • 18. Optimal? With loose enough cooling schedule