simplify.education

Computer science / artificial intelligence · BEGINNER LESSON

Algorithm

An algorithm is a step-by-step procedure for solving a problem or reaching a goal. In computing, it is the set of rules a machine follows to carry out a task, often as software code.

What it is

An algorithm is a finite sequence of steps or rules used to solve a problem or accomplish an end. A familiar non-computer example is a recipe. In computers, an algorithm is written in code and tells the system what discrete actions and calculations to perform. In artificial intelligence (AI), the algorithm is the part that helps software find, sort, and look for patterns in data.

[1] Reference Guide on Artificial Intelligence - NCBI - NIH [2] [PDF] Algorithms 2/13/01 Lecture #4 16.070 - MIT

How it works

An algorithm works by taking inputs, applying defined operations in order, and producing one or more outputs. Good algorithms are unambiguous, meaning each step is precisely defined, and they should finish in a finite number of steps. In AI, the choice of algorithm matters because it helps determine which data are selected and how strongly they are weighted when making a prediction. That means the same training data can lead to different results if a different algorithm is used.

[1] Reference Guide on Artificial Intelligence - NCBI - NIH [2] [PDF] Algorithms 2/13/01 Lecture #4 16.070 - MIT

Why data and design matter

AI systems do not learn from experience the way humans do; their experience comes from data chosen by people. If the data are incomplete, inaccurate, or misrepresented, the algorithm can produce skewed results and wrong answers. The sources also note that algorithms are shaped by human design choices, including what data are used for training and testing and what metrics are used to judge performance. This is why accuracy can depend not only on data volume but also on the algorithm itself.

[1] Reference Guide on Artificial Intelligence - NCBI - NIH

Limitations

Algorithms are not magic and do not guarantee correct results. A model trained on too little relevant data, such as only one image of a tumor or no examples at all, is less likely to identify a tumor correctly. In addition, some algorithmic systems, especially online systems that filter or curate content, can be opaque and hard to inspect, and user behavior can feed back into future outputs. These limits show that an algorithm’s result depends on its inputs, rules, and human design choices.

[1] Reference Guide on Artificial Intelligence - NCBI - NIH [3] https://doi.org/10.1177/17456916231180809

SEE THE IDEA

How an algorithm produces a result

Input data are processed by rules; human design choices influence both the rules and the data, which affects the output.

An algorithm turns inputs into outputs, but the result depends on the step-by-step rules and on human choices about data and evaluation.

TRY IT YOURSELF

Test your understanding

Choose an answer, then check the explanation.

0 of 3 questions answered
01 Which example best matches the meaning of algorithm used in these sources?
02 A tumor-detection system was trained on only one image of a cancerous tumor. What is the most likely concern?
03 Which statement is most accurate about algorithms in AI?

PUT IT TOGETHER

Match each concept to its meaning

Drag a label onto its description, or select a label and then select a description. This also works with a keyboard.

Sources and further reading

This general lesson was generated from public source material. It explains a concept; it does not interpret a private paper or provide medical advice.

  1. Reference Guide on Artificial Intelligence - NCBI - NIH
  2. [PDF] Algorithms 2/13/01 Lecture #4 16.070 - MIT
  3. https://doi.org/10.1177/17456916231180809
Apply this to a paper →