Heuristic Algorithm in Artificial Intelligence

The simplest meaning of heuristics in artificial intelligence is making an approximation to reach the solution faster rather than trying all the options available.

Like in mathematics we are provided with statements such as the cost price is twice the selling price, in such cases, we always assume the selling price such as a variable ‘a’ and then the cost price will be twice of ‘a’. Here we can see the heuristics approach rather than trying all the possible solutions that will fit the criteria we start with an approximation. We could have solved the value without the approximation but it would have consumed too much of the time to try every possible option.

The heuristic approach is a technique to solve the problem quickly. Like we have talked in the uninformed searching, the searching starts from an initial state and tries all the possible states that we can have from our space state and when we have reached the goal state at that point our search will end. But the only difficulty that we face in its application is that as the space states increase our time complexity increases and it increases exponentially than linearly. For example, solving chess problems in such cases the time complexity will be in a form of (b^d). All these kinds of problems come under the Non-polynomial type problem or it is generally referred as the NP problem because in such problems the time complexity is so much that they cannot be practiced without a heuristic approach in a real-life scenario. The work of the heuristic approach is to reduce the time complexity that would have been earlier not possible to be reduced if we have tried all the possible combinations instead we only try the best possible outcome options from the multiple solutions and this is also called the greedy approach.

So if you want to solve a Non-polynomial problem in polynomial time then a heuristic function is applied. The heuristic function may determine the solution as the form of maximum value or the minimum value so that it can begin the search either with the state space that has the maximum value or either the minimum value and this will greatly reduce the search as the heuristic function will keep on repeating the loop over and over again and keep on selecting either the minimum or maximum value again and again. In this way, we can obtain the solution but the solution will be a combination of what we suppose to be the best options present. This can offer us a good solution in a short time but not an optimal solution. 

For example, you have to find the distance between the initial state and the goal state, there can be one way that you start in all direction and travel each direction to see if you are reaching the path this kind of approach is opposite to the heuristic approach where there is guiding information for making a decision and also these type of search is called uninformed searches. Whereas the other way to reaching two points in the shortest time possible is when you start from the initial point and travel from that initial point to all direction and the after some time has collapsed you stop and wherever you have reached you calculate the distance and you do it with all the possible states that you have reached now the minimum distance will become our next selected point to travel, and all the above steps will repeat until we have reached our goal point, now this method is called the Euclidean distance method and comes under the heuristic approach. The same case is followed in the Manhattan distance and the number of tile problems both methods can give us the least distance covering the path.

The thing that you have to remember is that the heuristic function can prove as a guide in finding the best solution and the heuristic search occurs in the result of the heuristic function. The purpose of the heuristic function is to guide the heuristic search process and opt for the optimal path from various other paths that are available.

There is an opposite strategy that is devised beside the heuristic search approach and that is called blind search. As the heuristic can act on some approximate or guide, the blind search has absolutely no idea or the knowledge of the problem that it is going to act upon. The blind search is also known as the uninformed search where there is no guiding path to the function and the initial and the final state is provided to the function to act upon and it has to try all possibilities.

 

One thought on “Heuristic Algorithm in Artificial Intelligence

  • October 8, 2020 at 8:57 pm
    Permalink

    I enjoyed this-Useful read, but I don’t know where to go next. Which of your articles would you point me to read next?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *