Student Resources What Is an Algorithm in Psychology? Definition, Examples, and Uses By Kendra Cherry, MSEd Kendra Cherry, MSEd Kendra Cherry, MS, is a psychosocial rehabilitation specialist, psychology educator, and author of the "Everything Psychology Book." Learn about our editorial process Updated on November 24, 2023 Learn more." tabindex="0" data-inline-tooltip="true"> Fact checked Verywell Mind content is rigorously reviewed by a team of qualified and experienced fact checkers. Fact checkers review articles for factual accuracy, relevance, and timeliness. We rely on the most current and reputable sources, which are cited in the text and listed at the bottom of each article. Content is fact checked after it has been edited and before publication. Learn more. by James Lacy Fact checked by James Lacy James Lacy, MLS, is a fact-checker and researcher. Learn about our editorial process Print biffspandex / E+ / Getty Images Table of Contents View All Table of Contents How Does an Algorithm Work? Examples of Algorithms Reasons to Use Algorithms Potential Pitfalls Algorithms vs. Heuristics Trending Videos Close this video player When solving a problem, choosing the right approach is often the key to arriving at the best solution. In psychology, one of these problem-solving approaches is known as an algorithm. While often thought of purely as a mathematical term, the same type of process can be followed in psychology to find the correct answer when solving a problem or making a decision. An algorithm is a defined set of step-by-step procedures that provides the correct answer to a particular problem. By following the instructions correctly, you are guaranteed to arrive at the right answer. At a Glance Algorithms involve following specific steps in order to reach a solution to a problem. They can be a great tool when you need an accurate solution but tend to be more time-consuming than other methods.This article discusses how algorithms are used as an approach to problem-solving. It also covers how psychologists compare this approach to other problem-solving methods. How Does an Algorithm Work? An algorithm is often expressed in the form of a graph, where a square represents each step. Arrows then branch off from each step to point to possible directions that you may take to solve the problem. In some cases, you must follow a particular set of steps to solve the problem. In other instances, you might be able to follow different paths that will all lead to the same solution. Algorithms are essential step-by-step approaches to solving a problem. Rather than guessing or using trial-and-error, this approach is more likely to guarantee a specific solution. Using an algorithm can help you solve day-to-day problems you face, but it can also help mental health professionals find ways to help people cope with mental health problems. For example, a therapist might use an algorithm to treat a person experiencing something like anxiety. Because the therapist knows that a particular approach is likely to be effective, they would recommend a series of specific, focused steps as part of their intervention. Examples of Algorithms There are many different examples of how algorithms can be used in daily life. Some common ones include: A recipe for cooking a particular dish The method a search engine uses to find information on the internet Instructions for how to assemble a bicycle Instructions for how to solve a Rubik's cube A process to determine what type of treatment is most appropriate for certain types of mental health conditions Doctors and mental health professionals often use algorithms to diagnose mental disorders. For example, they may use a step-by-step approach when they evaluate people. This might involve asking the individual about their symptoms and their medical history. The doctor may also conduct lab tests, physical exams, or psychological assessments. Using this information, they then utilize the "Diagnostic and Statistical Manual of Mental Disorders" (DSM-5-TR) to make a diagnosis. Reasons to Use Algorithms in Psychology The upside of using an algorithm to solve a problem or make a decision is that yields the best possible answer every time. There are situations where using an algorithm can be the best approach: When Accuracy Is Crucial Algorithms can be particularly useful in situations when accuracy is critical. They are also a good choice when similar problems need to be frequently solved. Computer programs can often be designed to speed up this process. Data then needs to be placed in the system so that the algorithm can be executed for the correct solution. Artificial intelligence may also be a tool for making clinical assessments in healthcare situations. When Each Decision Needs to Follow the Same Process Such step-by-step approaches can be useful in situations where each decision must be made following the same process. Because the process follows a prescribed procedure, you can be sure that you will reach the correct answer each time. Potential Pitfalls When Using Algorithms The downside of using an algorithm to solve the problem is that this process tends to be very time-consuming. So if you face a situation where a decision must be made very quickly, you might be better off using a different problem-solving strategy. For example, an emergency room doctor making a decision about how to treat a patient could use an algorithm approach. However, this would be very time-consuming and treatment needs to be implemented quickly. In this instance, the doctor would instead rely on their expertise and past experiences to very quickly choose what they feel is the right treatment approach. Algorithms can sometimes be very complex and may only apply to specific situations. This can limit their use and make them less generalizable when working with larger populations. Recap Algorithms can be a great problem-solving choice when the answer needs to be 100% accurate or when each decision needs to follow the same process. A different approach might be needed if speed is the primary concern. Algorithms vs. Heuristics In psychology, algorithms are frequently contrasted with heuristics. Both can be useful when problem-solving, but it is important to understand the differences between them. What Is a Heuristic? A heuristic is a mental shortcut that allows people to quickly make judgments and solve problems. These mental shortcuts are typically informed by our past experiences and allow us to act quickly. However, heuristics are really more of a rule-of-thumb; they don't always guarantee a correct solution. So how do you determine when to use a heuristic and when to use an algorithm? When problem-solving, deciding which method to use depends on the need for either accuracy or speed. When to Use an Algorithm If complete accuracy is required, it is best to use an algorithm. By using an algorithm, accuracy is increased and potential mistakes are minimized. If you are working in a situation where you absolutely need the correct or best possible answer, your best bet is to use an algorithm. When you are solving problems for your math homework, you don't want to risk your grade on a guess. By following an algorithm, you can ensure that you will arrive at the correct answer to each problem. When to Use a Heuristic On the other hand, if time is an issue, then it may be best to use a heuristic. Mistakes may occur, but this approach allows for speedy decisions when time is of the essence. Heuristics are more commonly used in everyday situations, such as figuring out the best route to get from point A to point B. While you could use an algorithm to map out every possible route and determine which one would be the fastest, that would be a very time-consuming process. Instead, your best option would be to use a route that you know has worked well in the past. Summary Psychologists who study problem-solving have described two main processes people utilize to reach conclusions: algorithms and heuristics. Knowing which approach to use is important because these two methods can vary in terms of speed and accuracy. While each situation is unique, you may want to use an algorithm when being accurate is the primary concern. But if time is of the essence, then an algorithm is likely not the best choice. How to Find the Mean, Median, and Mode 4 Sources Verywell Mind uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy. Lang JM, Ford JD, Fitzgerald MM. An algorithm for determining use of trauma-focused cognitive-behavioral therapy. Psychotherapy (Chic). 2010;47(4):554-69. doi:10.1037/a0021184 Stein DJ, Shoptaw SJ, Vigo DV, et al. Psychiatric diagnosis and treatment in the 21st century: paradigm shifts versus incremental integration. World Psychiatry. 2022;21(3):393-414. doi:10.1002/wps.20998 Bobadilla-Suarez S, Love BC. Fast or frugal, but not both: decision heuristics under time pressure. J Exp Psychol Learn Mem Cogn. 2018;44(1):24-33. doi:10.1037/xlm0000419 Giordano C, Brennan M, Mohamed B, Rashidi P, Modave F, Tighe P. Accessing artificial intelligence for clinical decision-making. Front Digit Health. 2021;3:645232. doi:10.3389/fdgth.2021.645232 By Kendra Cherry, MSEd Kendra Cherry, MS, is a psychosocial rehabilitation specialist, psychology educator, and author of the "Everything Psychology Book." See Our Editorial Process Meet Our Review Board Share Feedback Was this page helpful? Thanks for your feedback! What is your feedback? Helpful Report an Error Other Submit