SlideShare a Scribd company logo
1 of 14
HILL CLIMBING
ALGORITHM
Dr. C.V. Suresh Babu
(CentreforKnowledgeTransfer)
institute
HILL CLIMBING: AN INTRODUCTION
• Hill Climbing is a heuristic search used for mathematical optimization problems in
the field of Artificial Intelligence.
• Given a large set of inputs and a good heuristic function, it tries to find a sufficiently
good solution to the problem.
• This solution may not be the global optimal maximum.
(CentreforKnowledgeTransfer)
institute
HILL CLIMBING: AN INTRODUCTION
• In the above definition, mathematical optimization problems implies that hill-
climbing solves the problems where we need to maximize or minimize a given real
function by choosing values from the given inputs. Example-Travelling salesman
problem where we need to minimize the distance traveled by the salesman.
• ‘Heuristic search’ means that this search algorithm may not find the optimal solution
to the problem. However, it will give a good solution in reasonable time.
• A heuristic function is a function that will rank all the possible alternatives at any
branching step in search algorithm based on the available information. It helps the
algorithm to select the best route out of possible routes.
(CentreforKnowledgeTransfer)
institute
FEATURES OF HILL CLIMBING
(CentreforKnowledgeTransfer)
institute
VARIANT OF GENERATE AND TEST
ALGORITHM
• It is a variant of generate and test algorithm.
• The generate and test algorithm is as follows :
1. Generate possible solutions.
2. Test to see if this is the expected solution.
3. If the solution has been found quit else go to step 1.
• Hence we call Hill climbing as a variant of generate and test algorithm as it takes the
feedback from the test procedure.
• Then this feedback is utilized by the generator in deciding the next move in search
space.
(CentreforKnowledgeTransfer)
institute
USES THE GREEDY APPROACH
• At any point in state space, the search moves in that direction only which
optimizes the cost of function with the hope of finding the optimal solution at the
end.
(CentreforKnowledgeTransfer)
institute
TYPES OF HILL CLIMBING
(CentreforKnowledgeTransfer)
institute
SIMPLE HILL CLIMBING
It examines the neighbouring nodes one by one and selects the first neighboring node which
optimizes the current cost as next node.
• Step 1 : Evaluate the initial state. If it is a goal state then stop and return success. Otherwise,
make initial state as current state.
• Step 2 : Loop until the solution state is found or there are no new operators present which
can be applied to the current state.
a) Select a state that has not been yet applied to the current state and apply it to produce a
new state.
b) Perform these to evaluate new state
i. If the current state is a goal state, then stop and return success.
ii. If it is better than the current state, then make it current state and proceed further.
iii. If it is not better than the current state, then continue in the loop until a solution is found.
• Step 3 : Exit.
(CentreforKnowledgeTransfer)
institute
STEEPEST-ASCENT HILL CLIMBING
It first examines all the neighbouring nodes and then selects the node closest to the solution
state as of next node.
Step 1 : Evaluate the initial state. If it is a goal state then stop and return success. Otherwise,
make initial state as current state.
Step 2 : Repeat these steps until a solution is found or current state does not change
a) Select a state that has not been yet applied to the current state.
b) Initialize a new ‘best state’ equal to current state and apply it to produce a new state.
c) Perform these to evaluate new state
i. If the current state is a goal state, then stop and return success.
ii. If it is better then best state, then make it best state else continue loop with another new state.
d) Make best state as current state and go to Step 2: b) part.
Step 3 : Exit
(CentreforKnowledgeTransfer)
institute
STOCHASTIC HILL CLIMBING
It does not examine all the neighboring nodes before deciding which node to select .
It just selects a neighboring node at random and decides (based on the amount of improvement in that
neighbor) whether to move to that neighbor or to examine another.
Step 1: Evaluate the initial state. If it is a goal state then stop and return success. Otherwise, make initial state
as current state.
Step 2: Repeat these steps until a solution is found or current state does not change.
a) Select a state that has not been yet applied to the current state.
b) Apply successor function to the current state and generate all the neighbour states.
c) Among the generated neighbour states which are better than current state choose a state
randomly (or based on some probability
function).
d) If the choosen state is goal state, then return success, else make it current state and repeat step
2: b) part.
Step 3: Exit.
(CentreforKnowledgeTransfer)
institute
STATE SPACE DIAGRAM FOR HILL
CLIMBING
State space diagram is a graphical representation of the set of states our search
algorithm can reach vs the value of our objective function(the function which we
wish to maximize).
• X-axis : denotes the state space ie states or configuration our algorithm may
reach.
• Y-axis : denotes the values of objective function corresponding to a particular
state.
The best solution will be that state space where objective function has maximum
value(global maximum).
(CentreforKnowledgeTransfer)
institute
(CentreforKnowledgeTransfer)
institute
DIFFERENT REGIONS IN THE STATE
SPACE DIAGRAM:
• Local maximum: It is a state which is better than its neighboring state however there exists
a state which is better than it(global maximum). This state is better because here the value
of the objective function is higher than its neighbors.
• Global maximum : It is the best possible state in the state space diagram. This because at
this state, objective function has highest value.
• Plateua/flat local maximum : It is a flat region of state space where neighboring states have
the same value.
• Ridge : It is region which is higher than its neighbours but itself has a slope. It is a special
kind of local maximum.
• Current state : The region of state space diagram where we are currently present during
the search.
• Shoulder : It is a plateau that has an uphill edge.
(CentreforKnowledgeTransfer)
institute
PROBLEMS IN DIFFERENT
REGIONS IN HILL CLIMBING
Hill climbing cannot reach the optimal/best state(global maximum) if it
enters any of the following regions :
• Local maximum : At a local maximum all neighboring states have a values
which is worse than the current state. Since hill-climbing uses a greedy
approach, it will not move to the worse state and terminate itself. The
process will end even though a better solution may exist.
To overcome local maximum problem : Utilize backtracking technique. Maintain a list of visited
states. If the search reaches an undesirable state, it can backtrack to the previous configuration
and explore a new path.
• Plateau : On plateau all neighbors have same value . Hence, it is not
possible to select the best direction.
To overcome plateaus : Make a big jump. Randomly select a state far away from the current
state. Chances are that we will land at a non-plateau region.
• Ridge : Any point on a ridge can look like peak because movement in all
possible directions is downward. Hence the algorithm stops when it
reaches this state.
To overcome Ridge : In this kind of obstacle, use two or more rules before testing. It implies
(CentreforKnowledgeTransfer)
institute

More Related Content

What's hot

Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesDr. C.V. Suresh Babu
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniquesKirti Verma
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AIKirti Verma
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agentsMegha Sharma
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligencegrinu
 
Production System in AI
Production System in AIProduction System in AI
Production System in AIBharat Bhushan
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI Bharat Bhushan
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemMohammad Imam Hossain
 
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
Artificial IntelligenceArtificial Intelligence
Artificial IntelligenceJay Nagar
 
State space search
State space searchState space search
State space searchchauhankapil
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptarunsingh660
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded searchHema Kashyap
 

What's hot (20)

Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Informed search
Informed searchInformed search
Informed search
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
search strategies in artificial intelligence
search strategies in artificial intelligencesearch strategies in artificial intelligence
search strategies in artificial intelligence
 
Problems, Problem spaces and Search
Problems, Problem spaces and SearchProblems, Problem spaces and Search
Problems, Problem spaces and Search
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
State space search
State space searchState space search
State space search
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded search
 

Similar to Hill climbing algorithm

Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed searchHamzaJaved64
 
AI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptxAI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptxAsst.prof M.Gokilavani
 
Informed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxInformed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxKirti Verma
 
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxCCBProduction
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
AI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptxAI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptxAsst.prof M.Gokilavani
 
hill climbing algorithm.pptx
hill climbing algorithm.pptxhill climbing algorithm.pptx
hill climbing algorithm.pptxMghooolMasier
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptx24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptxManiMaran230751
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-LearningKuppusamy P
 
chapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfchapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfMeghaGupta952452
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptkarthikaparthasarath
 
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligencemohsinwaseer1
 
Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...KrishnaVeni451953
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceBharat Bhushan
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceBharat Bhushan
 

Similar to Hill climbing algorithm (20)

AI_ppt.pptx
AI_ppt.pptxAI_ppt.pptx
AI_ppt.pptx
 
Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed search
 
AI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptxAI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptx
 
Informed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxInformed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptx
 
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
AI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptxAI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptx
 
hill climbing algorithm.pptx
hill climbing algorithm.pptxhill climbing algorithm.pptx
hill climbing algorithm.pptx
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptx24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptx
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
 
chapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfchapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdf
 
CH2_AI_Lecture1.ppt
CH2_AI_Lecture1.pptCH2_AI_Lecture1.ppt
CH2_AI_Lecture1.ppt
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligence
 
Searching techniques
Searching techniquesSearching techniques
Searching techniques
 
AI_HILL_CLIMBING.ppt
AI_HILL_CLIMBING.pptAI_HILL_CLIMBING.ppt
AI_HILL_CLIMBING.ppt
 
Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
 

More from Dr. C.V. Suresh Babu (20)

Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
 
Association rules
Association rulesAssociation rules
Association rules
 
Clustering
ClusteringClustering
Clustering
 
Classification
ClassificationClassification
Classification
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
 
DART
DARTDART
DART
 
Mycin
MycinMycin
Mycin
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
 
Bayes network
Bayes networkBayes network
Bayes network
 
Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Rule based system
Rule based systemRule based system
Rule based system
 
Formal Logic in AI
Formal Logic in AIFormal Logic in AI
Formal Logic in AI
 
Production based system
Production based systemProduction based system
Production based system
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
 
Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AI
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 

Hill climbing algorithm

  • 1. HILL CLIMBING ALGORITHM Dr. C.V. Suresh Babu (CentreforKnowledgeTransfer) institute
  • 2. HILL CLIMBING: AN INTRODUCTION • Hill Climbing is a heuristic search used for mathematical optimization problems in the field of Artificial Intelligence. • Given a large set of inputs and a good heuristic function, it tries to find a sufficiently good solution to the problem. • This solution may not be the global optimal maximum. (CentreforKnowledgeTransfer) institute
  • 3. HILL CLIMBING: AN INTRODUCTION • In the above definition, mathematical optimization problems implies that hill- climbing solves the problems where we need to maximize or minimize a given real function by choosing values from the given inputs. Example-Travelling salesman problem where we need to minimize the distance traveled by the salesman. • ‘Heuristic search’ means that this search algorithm may not find the optimal solution to the problem. However, it will give a good solution in reasonable time. • A heuristic function is a function that will rank all the possible alternatives at any branching step in search algorithm based on the available information. It helps the algorithm to select the best route out of possible routes. (CentreforKnowledgeTransfer) institute
  • 4. FEATURES OF HILL CLIMBING (CentreforKnowledgeTransfer) institute
  • 5. VARIANT OF GENERATE AND TEST ALGORITHM • It is a variant of generate and test algorithm. • The generate and test algorithm is as follows : 1. Generate possible solutions. 2. Test to see if this is the expected solution. 3. If the solution has been found quit else go to step 1. • Hence we call Hill climbing as a variant of generate and test algorithm as it takes the feedback from the test procedure. • Then this feedback is utilized by the generator in deciding the next move in search space. (CentreforKnowledgeTransfer) institute
  • 6. USES THE GREEDY APPROACH • At any point in state space, the search moves in that direction only which optimizes the cost of function with the hope of finding the optimal solution at the end. (CentreforKnowledgeTransfer) institute
  • 7. TYPES OF HILL CLIMBING (CentreforKnowledgeTransfer) institute
  • 8. SIMPLE HILL CLIMBING It examines the neighbouring nodes one by one and selects the first neighboring node which optimizes the current cost as next node. • Step 1 : Evaluate the initial state. If it is a goal state then stop and return success. Otherwise, make initial state as current state. • Step 2 : Loop until the solution state is found or there are no new operators present which can be applied to the current state. a) Select a state that has not been yet applied to the current state and apply it to produce a new state. b) Perform these to evaluate new state i. If the current state is a goal state, then stop and return success. ii. If it is better than the current state, then make it current state and proceed further. iii. If it is not better than the current state, then continue in the loop until a solution is found. • Step 3 : Exit. (CentreforKnowledgeTransfer) institute
  • 9. STEEPEST-ASCENT HILL CLIMBING It first examines all the neighbouring nodes and then selects the node closest to the solution state as of next node. Step 1 : Evaluate the initial state. If it is a goal state then stop and return success. Otherwise, make initial state as current state. Step 2 : Repeat these steps until a solution is found or current state does not change a) Select a state that has not been yet applied to the current state. b) Initialize a new ‘best state’ equal to current state and apply it to produce a new state. c) Perform these to evaluate new state i. If the current state is a goal state, then stop and return success. ii. If it is better then best state, then make it best state else continue loop with another new state. d) Make best state as current state and go to Step 2: b) part. Step 3 : Exit (CentreforKnowledgeTransfer) institute
  • 10. STOCHASTIC HILL CLIMBING It does not examine all the neighboring nodes before deciding which node to select . It just selects a neighboring node at random and decides (based on the amount of improvement in that neighbor) whether to move to that neighbor or to examine another. Step 1: Evaluate the initial state. If it is a goal state then stop and return success. Otherwise, make initial state as current state. Step 2: Repeat these steps until a solution is found or current state does not change. a) Select a state that has not been yet applied to the current state. b) Apply successor function to the current state and generate all the neighbour states. c) Among the generated neighbour states which are better than current state choose a state randomly (or based on some probability function). d) If the choosen state is goal state, then return success, else make it current state and repeat step 2: b) part. Step 3: Exit. (CentreforKnowledgeTransfer) institute
  • 11. STATE SPACE DIAGRAM FOR HILL CLIMBING State space diagram is a graphical representation of the set of states our search algorithm can reach vs the value of our objective function(the function which we wish to maximize). • X-axis : denotes the state space ie states or configuration our algorithm may reach. • Y-axis : denotes the values of objective function corresponding to a particular state. The best solution will be that state space where objective function has maximum value(global maximum). (CentreforKnowledgeTransfer) institute
  • 13. DIFFERENT REGIONS IN THE STATE SPACE DIAGRAM: • Local maximum: It is a state which is better than its neighboring state however there exists a state which is better than it(global maximum). This state is better because here the value of the objective function is higher than its neighbors. • Global maximum : It is the best possible state in the state space diagram. This because at this state, objective function has highest value. • Plateua/flat local maximum : It is a flat region of state space where neighboring states have the same value. • Ridge : It is region which is higher than its neighbours but itself has a slope. It is a special kind of local maximum. • Current state : The region of state space diagram where we are currently present during the search. • Shoulder : It is a plateau that has an uphill edge. (CentreforKnowledgeTransfer) institute
  • 14. PROBLEMS IN DIFFERENT REGIONS IN HILL CLIMBING Hill climbing cannot reach the optimal/best state(global maximum) if it enters any of the following regions : • Local maximum : At a local maximum all neighboring states have a values which is worse than the current state. Since hill-climbing uses a greedy approach, it will not move to the worse state and terminate itself. The process will end even though a better solution may exist. To overcome local maximum problem : Utilize backtracking technique. Maintain a list of visited states. If the search reaches an undesirable state, it can backtrack to the previous configuration and explore a new path. • Plateau : On plateau all neighbors have same value . Hence, it is not possible to select the best direction. To overcome plateaus : Make a big jump. Randomly select a state far away from the current state. Chances are that we will land at a non-plateau region. • Ridge : Any point on a ridge can look like peak because movement in all possible directions is downward. Hence the algorithm stops when it reaches this state. To overcome Ridge : In this kind of obstacle, use two or more rules before testing. It implies (CentreforKnowledgeTransfer) institute