An algorithm is a precise, step-by-step set of instructions that a computer follows to complete a specific task or solve a defined problem, transforming a given input into the desired output through a well-defined sequence of operations. Algorithms are the fundamental building blocks of all software, not just AI, ranging from something as simple as sorting a list of numbers to something as complex as a deep neural network's training procedure.
In the context of AI and machine learning specifically, "algorithm" often refers to the particular technique used to train a model, distinct from the resulting trained model itself: gradient descent is an algorithm used to adjust a neural network's weights during training, for example, while the neural network that results from that training process is the model. Understanding this distinction matters because the same underlying model architecture can be trained using different algorithms, each with its own tradeoffs in speed, stability, and final performance.
