SlideShare a Scribd company logo
1 of 8
Simulated
Annealing
Dr L.Srinivasan
Associate Professor/CSE
Dr N.G.P IT
CS3491 –AI & ML
UNIT-1
01
Simulated Annealing
 A variation of hill climbing in which, at the beginning of the process, some
downhill moves may be made.
 Idea is to do enough exploration of the whole space early on , so that the
final solution is relatively insensitive to the starting state.
 Lowering the chances of getting caught at a local maximum, or plateau,
or a ridge.
2
Simulated Annealing
Hill climbing with a twist:
 allow some moves downhill (to worse states)
 start out allowing large downhill moves (to much worse states)and
gradually allow, only small downhill moves
 Based on physical process of annealing a metal to get the best (minimal
energy) state
3
Simulated Annealing
Physical Annealing
 Physical substances are melted and then gradually cooled until some
solid state is reached.
 The goal is to produce a minimal-energy final state.
 This process is one of valley descending where the objective function is
the energy level
4
Simulated Annealing
The rate at which the system is cooled is called annealing schedule
 Annealing schedule: if the temperature is lowered sufficiently slowly,
then the goal will be attained(global minimum).
 If cooled rapidly local minimum but not global minimum is reached
 If too slow time is wasted
 Nevertheless, there is some probability for a transition to a higher energy
state: 𝒆−∆𝑬/𝑻
5
Simulated Annealing
 The search initially jumps around a lot, exploring many regions of the
state space.
 The jumping is gradually reduced and the search becomes a simple hill
climb (search for local optimum).
 The simulated annealing process lowers the temperature by slow stages
until the system ``freezes" and no further changes occur.
6
Simulated Annealing
Algorithm
1. Evaluate the initial state. If it is goal state then return
2. Initialize BEST-SO-FAR to the current state
3. Set T according to an annealing schedule
4. Loop until a solution is found or there are no new operators left to be
applied:
- Selects and applies a new operator
- Evaluate the new state:
goal ->quit
compute ΔE = Val(current state) - Val(new state)
ΔE < 0 -> new current state-if is not goal state but better than the current
state then make it current. Set this state as BEST-SO-FAR 7
Simulated Annealing
Algorithm
else -> If it is not better than the current state make it the
current state with probability p= 𝒆−∆𝑬/𝑻
.
Randomly generate number between [0 1], if
p>number generated, move is accepted else do nothing
- Revise T as necessary according to annealing schedule
5. Return BEST-SO-FAR as answer
8

More Related Content

Similar to CS3491-Unit-1 Simulated Annealing.pptx

BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.pptGauravWani20
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.pptjpradha86
 
2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptx2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptxBhaskarTupte2
 
2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptx2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptxBhaskarTupte2
 
unit1.ppt
unit1.pptunit1.ppt
unit1.pptsamygs1
 

Similar to CS3491-Unit-1 Simulated Annealing.pptx (7)

Lec 6 bsc csit
Lec 6 bsc csitLec 6 bsc csit
Lec 6 bsc csit
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.ppt
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.ppt
 
Thermodynamics
ThermodynamicsThermodynamics
Thermodynamics
 
2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptx2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptx
 
2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptx2nd Law of Thermodynamics.pptx
2nd Law of Thermodynamics.pptx
 
unit1.ppt
unit1.pptunit1.ppt
unit1.ppt
 

Recently uploaded

PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxhublikarsn
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information SystemsAnge Felix NSANZIYERA
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfthietkevietthinh
 
Compressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI ApplicationsCompressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI ApplicationsMFatihSIRA
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Payal Garg #K09
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementDr. Deepak Mudgal
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2ChandrakantDivate1
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...ssuserdfc773
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 

Recently uploaded (20)

PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdf
 
Compressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI ApplicationsCompressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI Applications
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 

CS3491-Unit-1 Simulated Annealing.pptx

  • 2. Simulated Annealing  A variation of hill climbing in which, at the beginning of the process, some downhill moves may be made.  Idea is to do enough exploration of the whole space early on , so that the final solution is relatively insensitive to the starting state.  Lowering the chances of getting caught at a local maximum, or plateau, or a ridge. 2
  • 3. Simulated Annealing Hill climbing with a twist:  allow some moves downhill (to worse states)  start out allowing large downhill moves (to much worse states)and gradually allow, only small downhill moves  Based on physical process of annealing a metal to get the best (minimal energy) state 3
  • 4. Simulated Annealing Physical Annealing  Physical substances are melted and then gradually cooled until some solid state is reached.  The goal is to produce a minimal-energy final state.  This process is one of valley descending where the objective function is the energy level 4
  • 5. Simulated Annealing The rate at which the system is cooled is called annealing schedule  Annealing schedule: if the temperature is lowered sufficiently slowly, then the goal will be attained(global minimum).  If cooled rapidly local minimum but not global minimum is reached  If too slow time is wasted  Nevertheless, there is some probability for a transition to a higher energy state: 𝒆−∆𝑬/𝑻 5
  • 6. Simulated Annealing  The search initially jumps around a lot, exploring many regions of the state space.  The jumping is gradually reduced and the search becomes a simple hill climb (search for local optimum).  The simulated annealing process lowers the temperature by slow stages until the system ``freezes" and no further changes occur. 6
  • 7. Simulated Annealing Algorithm 1. Evaluate the initial state. If it is goal state then return 2. Initialize BEST-SO-FAR to the current state 3. Set T according to an annealing schedule 4. Loop until a solution is found or there are no new operators left to be applied: - Selects and applies a new operator - Evaluate the new state: goal ->quit compute ΔE = Val(current state) - Val(new state) ΔE < 0 -> new current state-if is not goal state but better than the current state then make it current. Set this state as BEST-SO-FAR 7
  • 8. Simulated Annealing Algorithm else -> If it is not better than the current state make it the current state with probability p= 𝒆−∆𝑬/𝑻 . Randomly generate number between [0 1], if p>number generated, move is accepted else do nothing - Revise T as necessary according to annealing schedule 5. Return BEST-SO-FAR as answer 8