SlideShare uma empresa Scribd logo
1 de 19
Presentation
on
By
BHARAT BHUSHAN
Asst. Professor, Department of Computer Sc.
RLSY College, Ranchi
Buddha Science and Technical Institute, Ranchi
www.bharatsir.com
Hill Climbing & Its Variations
Artificial Intelligence
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Hill - Climbing
A hill-climbing algorithm is an Artificial
Intelligence (AI) algorithm that increases in
value continuously until it achieves a peak
solution.
This algorithm is used to optimize
mathematical problems and in other real-
life applications like marketing and job
scheduling.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Hill - Climbing
It is also called greedy local search as it only
looks to its good immediate neighbor state and not
beyond that.
A node of hill climbing algorithm has two
components which are state and value.
Hill climbing algorithm is a technique which is
used for optimizing the mathematical problems.
One of the widely discussed examples of Hill
climbing algorithm is Traveling-salesman
Problem in which we need to minimize the
distance traveled by the salesman.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Features of Hill Climbing
Following are some main features of Hill Climbing
Algorithm:
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.
Greedy Approach: Hill-climbing algorithm search
moves in the direction which optimizes the cost.
No Backtracking: It does not backtrack the search
space, as it does not remember the previous states.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
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
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
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.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Types of Hill Climbing Algorithm:
 Simple Hill Climbing
 Steepest-Ascent Hill-Climbing
 Stochastic Hill Climbing
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
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:
Less time consuming
Less optimal solution and the solution is not
guaranteed
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Algorithm for Simple Hill Climbing
Step 1: Evaluate the initial state, if it is goal state then
return success and Stop.
Step 2: Loop Until a solution is found or there is no
new operator left to apply.
Step 3: Select and apply an operator to the current
state.
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.
Step 5: Exit.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
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
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Algorithm for Steepest-Ascent Hill Climbing
Step 1: Evaluate the initial state, if it is goal state
then return success and stop, else make
current state as initial state.
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:
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
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.
Step 5: Exit.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
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.
• Evaluate the initial state. If it is a goal state
then stop and return success. Otherwise,
make the initial state the current state.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Stochastic Hill Climbing
• Repeat these steps until a solution is found
or the current state does not change.
 Select a state that has not been yet
applied to the current state.
 Apply the successor function to the
current state and generate all the
neighbor states.
 Among the generated neighbor states
which are better than the current state
choose a state randomly.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Stochastic Hill Climbing
 If the chosen state is the goal state, then
return success, else make it the current state
and repeat step 2 of the second point.
• Exit from the function.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Application of Hill Climbing
Hill Climbing technique can be used to solve
many problems, where the current state allows
for an accurate evaluation function, such as
1. Network-Flow
2. Travelling Salesman problem
3. 8-Queens problem
4. Integrated Circuit design, etc.
Hill Climbing is used in inductive learning
methods too.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Advantages of Hill Climbing
1. Hill Climbing can be used in continuous as
well as domains.
2. These technique is very useful in job shop
scheduling, automatic programming, circuit
designing, and vehicle routing.
3. It is also helpful to solve pure optimization
problems where the objective is to find the
best state according to the objective
function.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Artificial Intelligence
Disadvantages of Hill Climbing
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.
Bharat Bhushan, Assistant Professor, RLSY College, Ranchi
Artificial Intelligence

Mais conteúdo relacionado

Mais procurados

UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
JenishaR1
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.ppt
jpradha86
 

Mais procurados (20)

UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
BeyondClassicalSearch.ppt
BeyondClassicalSearch.pptBeyondClassicalSearch.ppt
BeyondClassicalSearch.ppt
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
 
Lecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmLecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithm
 
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
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithm
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Hill climbing
Hill climbingHill climbing
Hill climbing
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
 
Agents_AI.ppt
Agents_AI.pptAgents_AI.ppt
Agents_AI.ppt
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 

Semelhante a Hill Climbing Algorithm in Artificial Intelligence

Production System in AI
Production System in AIProduction System in AI
Production System in AI
Bharat Bhushan
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
Bharat Bhushan
 
Heuristics Search Techniques
Heuristics Search TechniquesHeuristics Search Techniques
Heuristics Search Techniques
Bharat Bhushan
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Webinar20211
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
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
ManiMaran230751
 

Semelhante a Hill Climbing Algorithm in Artificial Intelligence (20)

Production System in AI
Production System in AIProduction System in AI
Production System in AI
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
 
AI_ppt.pptx
AI_ppt.pptxAI_ppt.pptx
AI_ppt.pptx
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.
 
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
 
Unit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingUnit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programming
 
Heuristics Search Techniques
Heuristics Search TechniquesHeuristics Search Techniques
Heuristics Search Techniques
 
Rapid motor adaptation for legged robots
Rapid motor adaptation for legged robotsRapid motor adaptation for legged robots
Rapid motor adaptation for legged robots
 
Nss power point_machine_learning
Nss power point_machine_learningNss power point_machine_learning
Nss power point_machine_learning
 
Paper on PLC
Paper on PLCPaper on PLC
Paper on PLC
 
Atlas robotics assignment
Atlas robotics assignmentAtlas robotics assignment
Atlas robotics assignment
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
 
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptx
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
Final-AI-Problem Solving.pdf
Final-AI-Problem Solving.pdfFinal-AI-Problem Solving.pdf
Final-AI-Problem Solving.pdf
 
Vehicle detection and speed detection
Vehicle detection and speed detectionVehicle detection and speed detection
Vehicle detection and speed detection
 
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
 

Mais de Bharat Bhushan

Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
Bharat Bhushan
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
Bharat Bhushan
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique
Bharat Bhushan
 
Digital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir KokarDigital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir Kokar
Bharat Bhushan
 
Digital Content Creation by Bharat Sir Kokar
Digital Content Creation by Bharat Sir KokarDigital Content Creation by Bharat Sir Kokar
Digital Content Creation by Bharat Sir Kokar
Bharat Bhushan
 
NEET PHYSICS RANCHI
NEET PHYSICS RANCHINEET PHYSICS RANCHI
NEET PHYSICS RANCHI
Bharat Bhushan
 
Bharat Sir Kokar
Bharat Sir KokarBharat Sir Kokar
Bharat Sir Kokar
Bharat Bhushan
 
Buddha Science and Technical Institute
Buddha Science and Technical Institute Buddha Science and Technical Institute
Buddha Science and Technical Institute
Bharat Bhushan
 

Mais de Bharat Bhushan (20)

NIMCET 2023 : Questions
NIMCET 2023  : QuestionsNIMCET 2023  : Questions
NIMCET 2023 : Questions
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique
 
Introduction to Artificial Intteligence
Introduction to Artificial IntteligenceIntroduction to Artificial Intteligence
Introduction to Artificial Intteligence
 
Introduction to Artificial Intteligence
Introduction to Artificial IntteligenceIntroduction to Artificial Intteligence
Introduction to Artificial Intteligence
 
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE
 
ARTIFICIAL INTELLIGENCE SYLLABUS
ARTIFICIAL INTELLIGENCE SYLLABUS ARTIFICIAL INTELLIGENCE SYLLABUS
ARTIFICIAL INTELLIGENCE SYLLABUS
 
Cyber Security
Cyber Security Cyber Security
Cyber Security
 
Cyber Security
Cyber Security Cyber Security
Cyber Security
 
Digital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir KokarDigital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir Kokar
 
Digital Content Creation by Bharat Sir Kokar
Digital Content Creation by Bharat Sir KokarDigital Content Creation by Bharat Sir Kokar
Digital Content Creation by Bharat Sir Kokar
 
NEET PHYSICS RANCHI
NEET PHYSICS RANCHINEET PHYSICS RANCHI
NEET PHYSICS RANCHI
 
Bharat Sir Kokar
Bharat Sir KokarBharat Sir Kokar
Bharat Sir Kokar
 
Buddha Science and Technical Institute
Buddha Science and Technical Institute Buddha Science and Technical Institute
Buddha Science and Technical Institute
 
The Information Technology ACT, 2000
The Information Technology ACT, 2000The Information Technology ACT, 2000
The Information Technology ACT, 2000
 
NEET PHYSICS KOKAR
NEET PHYSICS KOKARNEET PHYSICS KOKAR
NEET PHYSICS KOKAR
 
Seminar on The Information Technology ACT
Seminar on The Information Technology ACTSeminar on The Information Technology ACT
Seminar on The Information Technology ACT
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 

Hill Climbing Algorithm in Artificial Intelligence

  • 1. Presentation on By BHARAT BHUSHAN Asst. Professor, Department of Computer Sc. RLSY College, Ranchi Buddha Science and Technical Institute, Ranchi www.bharatsir.com Hill Climbing & Its Variations Artificial Intelligence
  • 2. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Hill - Climbing A hill-climbing algorithm is an Artificial Intelligence (AI) algorithm that increases in value continuously until it achieves a peak solution. This algorithm is used to optimize mathematical problems and in other real- life applications like marketing and job scheduling.
  • 3. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Hill - Climbing It is also called greedy local search as it only looks to its good immediate neighbor state and not beyond that. A node of hill climbing algorithm has two components which are state and value. Hill climbing algorithm is a technique which is used for optimizing the mathematical problems. One of the widely discussed examples of Hill climbing algorithm is Traveling-salesman Problem in which we need to minimize the distance traveled by the salesman.
  • 4. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Features of Hill Climbing Following are some main features of Hill Climbing Algorithm: 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. Greedy Approach: Hill-climbing algorithm search moves in the direction which optimizes the cost. No Backtracking: It does not backtrack the search space, as it does not remember the previous states.
  • 5. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence 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
  • 6. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence 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.
  • 7. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Types of Hill Climbing Algorithm:  Simple Hill Climbing  Steepest-Ascent Hill-Climbing  Stochastic Hill Climbing
  • 8. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence 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: Less time consuming Less optimal solution and the solution is not guaranteed
  • 9. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Algorithm for Simple Hill Climbing Step 1: Evaluate the initial state, if it is goal state then return success and Stop. Step 2: Loop Until a solution is found or there is no new operator left to apply. Step 3: Select and apply an operator to the current state. 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. Step 5: Exit.
  • 10. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence 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
  • 11. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Algorithm for Steepest-Ascent Hill Climbing Step 1: Evaluate the initial state, if it is goal state then return success and stop, else make current state as initial state. 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:
  • 12. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence 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. Step 5: Exit.
  • 13. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence 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. • Evaluate the initial state. If it is a goal state then stop and return success. Otherwise, make the initial state the current state.
  • 14. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Stochastic Hill Climbing • Repeat these steps until a solution is found or the current state does not change.  Select a state that has not been yet applied to the current state.  Apply the successor function to the current state and generate all the neighbor states.  Among the generated neighbor states which are better than the current state choose a state randomly.
  • 15. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Stochastic Hill Climbing  If the chosen state is the goal state, then return success, else make it the current state and repeat step 2 of the second point. • Exit from the function.
  • 16. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Application of Hill Climbing Hill Climbing technique can be used to solve many problems, where the current state allows for an accurate evaluation function, such as 1. Network-Flow 2. Travelling Salesman problem 3. 8-Queens problem 4. Integrated Circuit design, etc. Hill Climbing is used in inductive learning methods too.
  • 17. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Advantages of Hill Climbing 1. Hill Climbing can be used in continuous as well as domains. 2. These technique is very useful in job shop scheduling, automatic programming, circuit designing, and vehicle routing. 3. It is also helpful to solve pure optimization problems where the objective is to find the best state according to the objective function.
  • 18. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Artificial Intelligence Disadvantages of Hill Climbing 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.
  • 19. Bharat Bhushan, Assistant Professor, RLSY College, Ranchi Artificial Intelligence