Home » Machine Learning/Artificial Intelligence

Best first search in Artificial Intelligence

In this article, we are going to learn about the Best First search method used by the Artificial Intelligent agent in solving problems by the search. We will discuss what the best first search method is and what is the algorithm followed to implement it in intelligent agents?
Submitted by Monika Sharma, on May 29, 2019

Best First Search is another method to solve the problem by searching in an Intelligent Agent. In this search method, the agent simply chooses the best node based on heuristic value irrespective of where the node is. The heuristic value is attained by using the heuristic function which accepts the current state as an input and returns a heuristic value which is an integer value between -10 and +10. The state which has the maximum heuristic value is chosen to be the best state. The goal state always has a heuristic value of +10.

After getting the heuristic value of all the neighboring states, the agent gets the best value by simply sorting all the values in descending order and then simply choosing the first node in the order.

The best first search is efficient to use in many manners such as there is no need for the agent to go to each and every state and check for it to be the goal state. The agent can simply jump on to the best node which it gets from the sorted array.

The only drawback of this searching method is that if there are many numbers of neighboring nodes present, then finding all their heuristic values and sorting them and then finding the best node is a lengthy process.

Algorithm for Best First Search

Step 1: Evaluate the initial state. If it is the goal state, then quit and return the node.

Step 2: Evaluate the neighboring nodes.

Step 3: Loop until all the neighboring nodes or child nodes are explored and store them in an array.

Step 4: Sort the array in descending order according to their heuristic value.

Step 5: Choose the best node, which is the first node in the array.

Step 6: This is our goal state, so quit and return the node.






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.