Heuristic techniquesIn this article, we are going to discuss Heuristic techniques along with some examples that will help you to understand the Heuristic techniques more clearly. What is Heuristics?A heuristic is a technique that is used to solve a problem faster than the classic methods. These techniques are used to find the approximate solution of a problem when classical methods do not. Heuristics are said to be the problemsolving techniques that result in practical and quick solutions. Heuristics are strategies that are derived from past experience with similar problems. Heuristics use practical methods and shortcuts used to produce the solutions that may or may not be optimal, but those solutions are sufficient in a given limited timeframe. HistoryPsychologists Daniel Kahneman and Amos Tversky have developed the study of Heuristics in human decisionmaking in the 1970s and 1980s. However, this concept was first introduced by the Nobel Laureate Herbert A. Simon, whose primary object of research was problemsolving. Why do we need heuristics?Heuristics are used in situations in which there is the requirement of a shortterm solution. On facing complex situations with limited resources and time, Heuristics can help the companies to make quick decisions by shortcuts and approximated calculations. Most of the heuristic methods involve mental shortcuts to make decisions on past experiences. The heuristic method might not always provide us the finest solution, but it is assured that it helps us find a good solution in a reasonable time. Based on context, there can be different heuristic methods that correlate with the problem's scope. The most common heuristic methods are  trial and error, guesswork, the process of elimination, historical data analysis. These methods involve simply available information that is not particular to the problem but is most appropriate. They can include representative, affect, and availability heuristics. Heuristic search techniques in AI (Artificial Intelligence)We can perform the Heuristic techniques into two categories: Direct Heuristic Search techniques in AIIt includes Blind Search, Uninformed Search, and Blind control strategy. These search techniques are not always possible as they require much memory and time. These techniques search the complete space for a solution and use the arbitrary ordering of operations. The examples of Direct Heuristic search techniques include BreadthFirst Search (BFS) and Depth First Search (DFS). Weak Heuristic Search techniques in AIIt includes Informed Search, Heuristic Search, and Heuristic control strategy. These techniques are helpful when they are applied properly to the right types of tasks. They usually require domainspecific information. The examples of Weak Heuristic search techniques include Best First Search (BFS) and A*. Before describing certain heuristic techniques, let's see some of the techniques listed below:
First, let's talk about the Hill climbing in Artificial intelligence. Hill Climbing AlgorithmIt is a technique for optimizing the mathematical problems. Hill Climbing is widely used when a good heuristic is available. It is a local search algorithm that continuously moves in the direction of increasing elevation/value to find the mountain's peak or the best solution to the problem. It terminates when it reaches a peak value where no neighbor has a higher value. Travelingsalesman Problem is one of the widely discussed examples of the Hill climbing algorithm, in which we need to minimize the distance traveled by the salesman. It is also called greedy local search as it only looks to its good immediate neighbor state and not beyond that. The steps of a simple hillclimbing algorithm are listed below: Step 1: Evaluate the initial state. If it is the 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: If it is a goal state, then return to success and quit. Else if it is better than the current state, then assign a new state as a current state. Else if not better than the current state, then return to step2. Step 5: Exit. Best first search (BFS)This algorithm always chooses the path which appears best at that moment. It is the combination of depthfirst search and breadthfirst search algorithms. It lets us to take the benefit of both algorithms. It uses the heuristic function and search. With the help of the bestfirst search, at each step, we can choose the most promising node. Best first search algorithm: Step 1: Place the starting node into the OPEN list. Step 2: If the OPEN list is empty, Stop and return failure. Step 3: Remove the node n from the OPEN list, which has the lowest value of h(n), and places it in the CLOSED list. Step 4: Expand the node n, and generate the successors of node n. Step 5: Check each successor of node n, and find whether any node is a goal node or not. If any successor node is the goal node, then return success and stop the search, else continue to next step. Step 6: For each successor node, the algorithm checks for evaluation function f(n) and then check if the node has been in either OPEN or CLOSED list. If the node has not been in both lists, then add it to the OPEN list. Step 7: Return to Step 2. A* Search AlgorithmA* search is the most commonly known form of bestfirst search. It uses the heuristic function h(n) and cost to reach the node n from the start state g(n). It has combined features of UCS and greedy bestfirst search, by which it solve the problem efficiently. It finds the shortest path through the search space using the heuristic function. This search algorithm expands fewer search tree and gives optimal results faster. Algorithm of A* search: Step 1: Place the starting node in the OPEN list. Step 2: Check if the OPEN list is empty or not. If the list is empty, then return failure and stops. Step 3: Select the node from the OPEN list which has the smallest value of the evaluation function (g+h). If node n is the goal node, then return success and stop, otherwise. Step 4: Expand node n and generate all of its successors, and put n into the closed list. For each successor n', check whether n' is already in the OPEN or CLOSED list. If not, then compute the evaluation function for n' and place it into the Open list. Step 5: Else, if node n' is already in OPEN and CLOSED, then it should be attached to the back pointer which reflects the lowest g(n') value. Step 6: Return to Step 2. Examples of heuristics in everyday lifeSome of the reallife examples of heuristics that people use as a way to solve a problem:
Types of heuristicsThere are various types of heuristics, including the availability heuristic, affect heuristic and representative heuristic. Each heuristic type plays a role in decisionmaking. Let's discuss about the Availability heuristic, affect heuristic, and Representative heuristic. Availability heuristicAvailability heuristic is said to be the judgment that people make regarding the likelihood of an event based on information that quickly comes into mind. On making decisions, people typically rely on the past knowledge or experience of an event. It allows a person to judge a situation based on the examples of similar situations that come to mind. Representative heuristicIt occurs when we evaluate an event's probability on the basis of its similarity with another event. Example: We can understand the representative heuristic by the example of product packaging, as consumers tend to associate the products quality with the external packaging of a product. If a company packages its products that remind you of a high quality and wellknown product, then consumers will relate that product as having the same quality as the branded product. So, instead of evaluating the product based on its quality, customers correlate the products quality based on the similarity in packaging. Affect heuristicIt is based on the negative and positive feelings that are linked with a certain stimulus. It includes quick feelings that are based on past beliefs. Its theory is one's emotional response to a stimulus that can affect the decisions taken by an individual. When people take a little time to evaluate a situation carefully, they might base their decisions based on their emotional response. Example: The affect heuristic can be understood by the example of advertisements. Advertisements can influence the emotions of consumers, so it affects the purchasing decision of a consumer. The most common examples of advertisements are the ads of fast food. When fastfood companies run the advertisement, they hope to obtain a positive emotional response that pushes you to positively view their products. If someone carefully analyzes the benefits and risks of consuming fast food, they might decide that fast food is unhealthy. But people rarely take time to evaluate everything they see and generally make decisions based on their automatic emotional response. So, Fast food companies present advertisements that rely on such type of Affect heuristic for generating a positive emotional response which results in sales. Limitation of heuristicsAlong with the benefits, heuristic also has some limitations.
ConclusionThat's all about the article. Hence, in this article, we have discussed the heuristic techniques that are the problemsolving techniques that result in a quick and practical solution. We have also discussed some algorithms and examples, as well as the limitation of heuristics.
Next TopicWhat is RECTANGLE
