SlideShare a Scribd company logo
1 of 7
Download to read offline
Hill Climbing Algorithm in Artificial Intelligence
o Hill climbing algorithm is a local search algorithm which
continuously moves in the direction of increasing
elevation/value to find the peak of the mountain or best
solution to the problem.
o It terminates when it reaches a peak value where no
neighbor has a higher value.
o Hill climbing algorithm is a technique which is used for
optimizing the mathematical problems.
o It is also called greedy local search as it only looks to its
good immediate neighbor state and not beyond that.
o A node of hill climbing algorithm has two components
which are state and value.
o Hill Climbing is mostly used when a good heuristic is
available.
o In this algorithm, we don't need to maintain and handle
the search tree or graph as it only keeps a single current
state.
Features of Hill Climbing:
Following are some main features of Hill Climbing
Algorithm:
o Generate and Test variant: Hill Climbing is the
variant of Generate and Test method. The Generate and Test
method produce feedback which helps to decide which
direction to move in the search space.
o Greedy approach: Hill-climbing algorithm search
moves in the direction which optimizes the cost.
o No backtracking: It does not backtrack the search
space, as it does not remember the previous states.
State-space Diagram for Hill Climbing:
The state-space landscape is a graphical representation of
the hill-climbing algorithm which is showing a graph between
various states of algorithm and Objective function/Cost.
Different regions in the state space landscape:
Local Maximum: Local maximum is a state which is
better than its neighbor states, but there is also another
state which is higher than it.
Global Maximum: Global maximum is the best possible
state of state space landscape. It has the highest value of
objective function.
Current state: It is a state in a landscape diagram where
an agent is currently present.
Flat local maximum: It is a flat space in the landscape
where all the neighbor states of current states have the
same value.
Shoulder: It is a plateau region which has an uphill edge.
Types of Hill Climbing Algorithm:
o Simple hill Climbing:
o Steepest-Ascent hill-climbing:
o Stochastic hill Climbing:
1. Simple Hill Climbing:
Simple hill climbing is the simplest way to implement a hill
climbing algorithm. It only evaluates the neighbor node
state at a time and selects the first one which
optimizes current cost and set it as a current state. It
only checks it's one successor state, and if it finds better
than the current state, then move else be in the same state.
This algorithm has the following features:
o Less time consuming
o Less optimal solution and the solution is not guaranteed
Algorithm for Simple Hill Climbing:
o Step 1: Evaluate the initial state, if it is goal state then
return success and Stop.
o Step 2: Loop Until a solution is found or there is no new
operator left to apply.
o Step 3: Select and apply an operator to the current
state.
o Step 4: Check new state:
a. If it is goal state, then return success and quit.
b. Else if it is better than the current state then assign
new state as a current state.
c. Else if not better than the current state, then return to
step2.
o Step 5: Exit.
2. Steepest-Ascent hill climbing:
The steepest-Ascent algorithm is a variation of simple hill
climbing algorithm. This algorithm examines all the
neighboring nodes of the current state and selects one
neighbor node which is closest to the goal state. This
algorithm consumes more time as it searches for multiple
neighbors
Algorithm for Steepest-Ascent hill climbing:
o Step 1: Evaluate the initial state, if it is goal state then
return success and stop, else make current state as initial
state.
o Step 2: Loop until a solution is found or the current
state does not change.
a. Let SUCC be a state such that any successor of the
current state will be better than it.
b. For each operator that applies to the current state:
a. Apply the new operator and generate a new state.
b. Evaluate the new state.
c. If it is goal state, then return it and quit, else compare
it to the SUCC.
d. If it is better than SUCC, then set new state as SUCC.
e. If the SUCC is better than the current state, then set
current state to SUCC.
o Step 5: Exit.
3. Stochastic hill climbing:
Stochastic hill climbing does not examine for all its
neighbor before moving. Rather, this search algorithm
selects one neighbor node at random and decides whether to
choose it as a current state or examine another state.
Problems in Hill Climbing Algorithm:
1. Local Maximum: A local maximum is a peak state in
the landscape which is better than each of its neighboring
states, but there is another state also present which is
higher than the local maximum.
Solution: Backtracking technique can be a solution of the
local maximum in state space landscape. Create a list of the
promising path so that the algorithm can backtrack the
search space and explore other paths as well.
2. Plateau: A plateau is the flat area of the search space
in which all the neighbor states of the current state contains
the same value, because of this algorithm does not find any
best direction to move. A hill-climbing search might be lost
in the plateau area.
Solution: The solution for the plateau is to take big steps
or very little steps while searching, to solve the problem.
Randomly select a state which is far away from the current
state so it is possible that the algorithm could find non-
plateau region.
3. Ridges: A ridge is a special form of the local maximum.
It has an area which is higher than its surrounding areas, but
itself has a slope, and cannot be reached in a single move.
Solution: With the use of bidirectional search, or by
moving in different directions, we can improve this problem.
Simulated Annealing:
A hill-climbing algorithm which never makes a move
towards a lower value guaranteed to be incomplete because
it can get stuck on a local maximum. And if algorithm applies
a random walk, by moving a successor, then it may
complete but not efficient. Simulated Annealing is an
algorithm which yields both efficiency and completeness.
In mechanical term Annealing is a process of hardening a
metal or glass to a high temperature then cooling gradually,
so this allows the metal to reach a low-energy crystalline
state. The same process is used in simulated annealing in
which the algorithm picks a random move, instead of picking
the best move. If the random move improves the state, then
it follows the same path. Otherwise, the algorithm follows
the path which has a probability of less than 1 or it moves
downhill and chooses another path.

More Related Content

What's hot

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
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI Bharat Bhushan
 
AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAsst.prof M.Gokilavani
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithmMegha Sharma
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and SearchHitesh Mohapatra
 
State space search
State space searchState space search
State space searchchauhankapil
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AIKirti Verma
 
Production systems
Production systemsProduction systems
Production systemsAdri Jovin
 
State Space Search and Control Strategies in Artificial Intelligence.pptx
State Space Search and Control Strategies in Artificial Intelligence.pptxState Space Search and Control Strategies in Artificial Intelligence.pptx
State Space Search and Control Strategies in Artificial Intelligence.pptxRSAISHANKAR
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search techniqueKapil Dahal
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AIvikas dhakane
 
Production System in AI
Production System in AIProduction System in AI
Production System in AIBharat Bhushan
 
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
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligencegrinu
 
2. forward chaining and backward chaining
2. forward chaining and backward chaining2. forward chaining and backward chaining
2. forward chaining and backward chainingmonircse2
 
weak slot and filler structure
weak slot and filler structureweak slot and filler structure
weak slot and filler structureAmey Kerkar
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Falak Chaudry
 

What's hot (20)

A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
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
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptx
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithm
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
 
State space search
State space searchState space search
State space search
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
Production systems
Production systemsProduction systems
Production systems
 
State Space Search and Control Strategies in Artificial Intelligence.pptx
State Space Search and Control Strategies in Artificial Intelligence.pptxState Space Search and Control Strategies in Artificial Intelligence.pptx
State Space Search and Control Strategies in Artificial Intelligence.pptx
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
 
search strategies in artificial intelligence
search strategies in artificial intelligencesearch strategies in artificial intelligence
search strategies in artificial intelligence
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
 
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
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
2. forward chaining and backward chaining
2. forward chaining and backward chaining2. forward chaining and backward chaining
2. forward chaining and backward chaining
 
weak slot and filler structure
weak slot and filler structureweak slot and filler structure
weak slot and filler structure
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)
 

Similar to Hill climbing algorithm in artificial intelligence

Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed searchHamzaJaved64
 
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
 
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
 
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
 
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxCCBProduction
 
hill climbing algorithm.pptx
hill climbing algorithm.pptxhill climbing algorithm.pptx
hill climbing algorithm.pptxMghooolMasier
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptkarthikaparthasarath
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................pptShilpaBhatia32
 
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
 
chapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfchapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfMeghaGupta952452
 
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
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problemMohamed Gad
 

Similar to Hill climbing algorithm in artificial intelligence (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
 
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
 
Hill Climbing.pptx
Hill Climbing.pptxHill Climbing.pptx
Hill Climbing.pptx
 
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
 
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
 
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
 
hill climbing algorithm.pptx
hill climbing algorithm.pptxhill climbing algorithm.pptx
hill climbing algorithm.pptx
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
AI_HILL_CLIMBING.ppt
AI_HILL_CLIMBING.pptAI_HILL_CLIMBING.ppt
AI_HILL_CLIMBING.ppt
 
unit-1-l3.ppt
unit-1-l3.pptunit-1-l3.ppt
unit-1-l3.ppt
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................ppt
 
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
 
chapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfchapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdf
 
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
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
Informed search
Informed searchInformed search
Informed search
 

More from sandeep54552

Dijkstra Searching Algorithms Shortest.pptx
Dijkstra Searching Algorithms Shortest.pptxDijkstra Searching Algorithms Shortest.pptx
Dijkstra Searching Algorithms Shortest.pptxsandeep54552
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptxsandeep54552
 
Dijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptxDijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptxsandeep54552
 
YCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.pptYCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.pptsandeep54552
 
Queue_Data_Structure.pptx
Queue_Data_Structure.pptxQueue_Data_Structure.pptx
Queue_Data_Structure.pptxsandeep54552
 
Tree_Definition.pptx
Tree_Definition.pptxTree_Definition.pptx
Tree_Definition.pptxsandeep54552
 
Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxsandeep54552
 
Stack_Data_Structure.pptx
Stack_Data_Structure.pptxStack_Data_Structure.pptx
Stack_Data_Structure.pptxsandeep54552
 
File handling in c++
File handling in c++File handling in c++
File handling in c++sandeep54552
 
Exception handling in c++
Exception handling in c++Exception handling in c++
Exception handling in c++sandeep54552
 
Inheritance in c++
Inheritance in c++ Inheritance in c++
Inheritance in c++ sandeep54552
 
Constructor and Destructors in C++
Constructor and Destructors in C++Constructor and Destructors in C++
Constructor and Destructors in C++sandeep54552
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introductionsandeep54552
 

More from sandeep54552 (20)

Dijkstra Searching Algorithms Shortest.pptx
Dijkstra Searching Algorithms Shortest.pptxDijkstra Searching Algorithms Shortest.pptx
Dijkstra Searching Algorithms Shortest.pptx
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
Dijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptxDijkstra Searching Algorithms.pptx
Dijkstra Searching Algorithms.pptx
 
DFS_New.pptx
DFS_New.pptxDFS_New.pptx
DFS_New.pptx
 
Agents_AI.ppt
Agents_AI.pptAgents_AI.ppt
Agents_AI.ppt
 
YCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.pptYCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.ppt
 
Queue_Data_Structure.pptx
Queue_Data_Structure.pptxQueue_Data_Structure.pptx
Queue_Data_Structure.pptx
 
Tree_Definition.pptx
Tree_Definition.pptxTree_Definition.pptx
Tree_Definition.pptx
 
Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptx
 
Stack_Data_Structure.pptx
Stack_Data_Structure.pptxStack_Data_Structure.pptx
Stack_Data_Structure.pptx
 
Heap_Sort1.pptx
Heap_Sort1.pptxHeap_Sort1.pptx
Heap_Sort1.pptx
 
Quick_sort1.pptx
Quick_sort1.pptxQuick_sort1.pptx
Quick_sort1.pptx
 
Link_List.pptx
Link_List.pptxLink_List.pptx
Link_List.pptx
 
Templates in c++
Templates in c++Templates in c++
Templates in c++
 
File handling in c++
File handling in c++File handling in c++
File handling in c++
 
Exception handling in c++
Exception handling in c++Exception handling in c++
Exception handling in c++
 
Inheritance in c++
Inheritance in c++ Inheritance in c++
Inheritance in c++
 
Constructor and Destructors in C++
Constructor and Destructors in C++Constructor and Destructors in C++
Constructor and Destructors in C++
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
 
Jsp tag library
Jsp tag libraryJsp tag library
Jsp tag library
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 

Hill climbing algorithm in artificial intelligence

  • 1. Hill Climbing Algorithm in Artificial Intelligence o Hill climbing algorithm is a local search algorithm which continuously moves in the direction of increasing elevation/value to find the peak of the mountain or best solution to the problem. o It terminates when it reaches a peak value where no neighbor has a higher value. o Hill climbing algorithm is a technique which is used for optimizing the mathematical problems. o It is also called greedy local search as it only looks to its good immediate neighbor state and not beyond that. o A node of hill climbing algorithm has two components which are state and value. o Hill Climbing is mostly used when a good heuristic is available. o In this algorithm, we don't need to maintain and handle the search tree or graph as it only keeps a single current state. Features of Hill Climbing: Following are some main features of Hill Climbing Algorithm: o Generate and Test variant: Hill Climbing is the variant of Generate and Test method. The Generate and Test method produce feedback which helps to decide which direction to move in the search space. o Greedy approach: Hill-climbing algorithm search moves in the direction which optimizes the cost.
  • 2. o No backtracking: It does not backtrack the search space, as it does not remember the previous states. State-space Diagram for Hill Climbing: The state-space landscape is a graphical representation of the hill-climbing algorithm which is showing a graph between various states of algorithm and Objective function/Cost. Different regions in the state space landscape: Local Maximum: Local maximum is a state which is better than its neighbor states, but there is also another state which is higher than it. Global Maximum: Global maximum is the best possible state of state space landscape. It has the highest value of objective function. Current state: It is a state in a landscape diagram where an agent is currently present.
  • 3. Flat local maximum: It is a flat space in the landscape where all the neighbor states of current states have the same value. Shoulder: It is a plateau region which has an uphill edge. Types of Hill Climbing Algorithm: o Simple hill Climbing: o Steepest-Ascent hill-climbing: o Stochastic hill Climbing: 1. Simple Hill Climbing: Simple hill climbing is the simplest way to implement a hill climbing algorithm. It only evaluates the neighbor node state at a time and selects the first one which optimizes current cost and set it as a current state. It only checks it's one successor state, and if it finds better than the current state, then move else be in the same state. This algorithm has the following features: o Less time consuming o Less optimal solution and the solution is not guaranteed Algorithm for Simple Hill Climbing: o Step 1: Evaluate the initial state, if it is goal state then return success and Stop. o Step 2: Loop Until a solution is found or there is no new operator left to apply. o Step 3: Select and apply an operator to the current state.
  • 4. o Step 4: Check new state: a. If it is goal state, then return success and quit. b. Else if it is better than the current state then assign new state as a current state. c. Else if not better than the current state, then return to step2. o Step 5: Exit. 2. Steepest-Ascent hill climbing: The steepest-Ascent algorithm is a variation of simple hill climbing algorithm. This algorithm examines all the neighboring nodes of the current state and selects one neighbor node which is closest to the goal state. This algorithm consumes more time as it searches for multiple neighbors Algorithm for Steepest-Ascent hill climbing: o Step 1: Evaluate the initial state, if it is goal state then return success and stop, else make current state as initial state. o Step 2: Loop until a solution is found or the current state does not change. a. Let SUCC be a state such that any successor of the current state will be better than it. b. For each operator that applies to the current state: a. Apply the new operator and generate a new state. b. Evaluate the new state. c. If it is goal state, then return it and quit, else compare it to the SUCC.
  • 5. d. If it is better than SUCC, then set new state as SUCC. e. If the SUCC is better than the current state, then set current state to SUCC. o Step 5: Exit. 3. Stochastic hill climbing: Stochastic hill climbing does not examine for all its neighbor before moving. Rather, this search algorithm selects one neighbor node at random and decides whether to choose it as a current state or examine another state. Problems in Hill Climbing Algorithm: 1. Local Maximum: A local maximum is a peak state in the landscape which is better than each of its neighboring states, but there is another state also present which is higher than the local maximum. Solution: Backtracking technique can be a solution of the local maximum in state space landscape. Create a list of the promising path so that the algorithm can backtrack the search space and explore other paths as well.
  • 6. 2. Plateau: A plateau is the flat area of the search space in which all the neighbor states of the current state contains the same value, because of this algorithm does not find any best direction to move. A hill-climbing search might be lost in the plateau area. Solution: The solution for the plateau is to take big steps or very little steps while searching, to solve the problem. Randomly select a state which is far away from the current state so it is possible that the algorithm could find non- plateau region. 3. Ridges: A ridge is a special form of the local maximum. It has an area which is higher than its surrounding areas, but itself has a slope, and cannot be reached in a single move. Solution: With the use of bidirectional search, or by moving in different directions, we can improve this problem.
  • 7. Simulated Annealing: A hill-climbing algorithm which never makes a move towards a lower value guaranteed to be incomplete because it can get stuck on a local maximum. And if algorithm applies a random walk, by moving a successor, then it may complete but not efficient. Simulated Annealing is an algorithm which yields both efficiency and completeness. In mechanical term Annealing is a process of hardening a metal or glass to a high temperature then cooling gradually, so this allows the metal to reach a low-energy crystalline state. The same process is used in simulated annealing in which the algorithm picks a random move, instead of picking the best move. If the random move improves the state, then it follows the same path. Otherwise, the algorithm follows the path which has a probability of less than 1 or it moves downhill and chooses another path.