What Is Artificial Intelligence?
Definitions, history and the idea of a rational agent.
A thermostat, a chess engine and a chatbot all turn what they sense into what they do. Which of them is intelligent? AI's working answer is refreshingly practical: build agents that act well, then measure how well they act.
What you’ll learn
- Compare the four classic definitions of AI and explain why the field settled on rational agents.
- Describe any AI system as an agent, with its performance measure, environment, actuators and sensors (PEAS).
- Explain why "rational" means maximizing expected performance, not being right every time.
- Sketch AI's history, from the Dartmouth workshop through two winters to the deep learning era.
- Name the core math of AI and carry out one step of gradient descent by hand.
Four answers to one question
What would convince you that a machine is intelligent? Researchers have given four kinds of answer. They differ on two questions: do we care about how a system thinks or how it acts, and is the yardstick a human or an ideal of rationality?
| Focus | Measured against humans | Measured against an ideal |
|---|---|---|
| Thinking | Cognitive modeling: does it reason the way people do? | Laws of thought: does it reason by correct logic? |
| Acting | The Turing test: can it pass for a person in conversation? | Rational agents: does it act to achieve the best expected outcome? |
The bottom-right cell won out because it is both general and measurable: you can score behavior without first settling what thinking is. In this course, artificial intelligence means building rational agents: systems that act to achieve the best expected outcome.
Most systems you will meet are narrow AI: a chess engine is superhuman at chess and useless at everything else. Whether today's general-purpose language models are steps toward artificial general intelligence is hotly debated, and there is no agreed definition or test for it.
A company judges its delivery-routing AI only by fuel saved and parcels delivered on time. It does not care how the system reaches its decisions. Which approach to AI is that?
- Thinking humanly
- Thinking rationally
- Acting humanly
- Acting rationally
Show the answer
D. Acting rationally
The company scores behavior against an ideal (the best achievable fuel use and punctuality), not against how a person would drive or reason. That is the rational-agent view.
Agents: percepts in, actions out
An agent is anything that perceives its environment through sensors and acts on it through actuators. At each moment it receives a percept, and its behavior is a rule that maps everything it has perceived so far to an action. A robot vacuum is an agent. So are a spam filter and a trading bot.
Before designing one, you pin down its task with PEAS: the Performance measure, the Environment, the Actuators and the Sensors.
| Agent | Performance measure | Environment | Actuators | Sensors |
|---|---|---|---|---|
| Robot vacuum | Floor cleaned, battery used | Rooms, furniture, dirt, pets | Wheels, brushes, suction | Bump and dirt sensors, camera |
| Self-driving taxi | Safe, legal, fast, comfortable trips | Roads, traffic, pedestrians, weather | Steering, throttle, brakes, signals | Cameras, lidar, radar, GPS |
Think first Is a thermostat an agent?
Yes, a very simple one. Its percept is the temperature, its action is heater on or off, and its rule is one comparison with the set point. Being an agent says nothing about being smart. How intelligent an agent is shows up in how well it scores on its performance measure.
Rational is not the same as perfect
A rational agent picks the action that maximizes the expected value of its performance measure, given what it has perceived and what it knows. "Expected" is the key word. The world can surprise it, so a rational agent can lose, and a foolish one can get lucky.
Below is a tiny world. One exit pays +1 and the other −1, but the floor is slippery: 20% of the time a move goes sideways. Once the values settle, each arrow is the best action in its cell, and each number is the reward the agent can expect to collect from there.
An agent takes a move with a 90% chance of success, the best option it had, and the move fails. What follows?
- It acted irrationally: a rational agent would have known the move would fail
- It may still have acted rationally: it chose the best action given what it knew
- Its performance measure must be wrong
- Rational agents never take risks, so it was not rational
Show the answer
B. It may still have acted rationally: it chose the best action given what it knew
Rationality is judged by the decision, not the outcome. Picking the best bet available is rational even when the 10% case happens. Demanding a correct guess every time would require omniscience.
Symbols, rules and two winters
In the summer of 1956 a workshop at Dartmouth College gave the field its name. The proposal by John McCarthy, Marvin Minsky, Nathaniel Rochester and Claude Shannon rested on a bold conjecture: that "every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it."
For three decades the leading approach was symbolic AI: write knowledge down as symbols and rules, then reason with search and logic. It produced theorem provers, game players and, in the 1980s, commercial expert systems that captured specialists' know-how in thousands of if–then rules.
| When | Milestone |
|---|---|
| 1950 | Turing proposes the imitation game |
| 1956 | The Dartmouth workshop names the field |
| 1958 | Rosenblatt's perceptron learns from examples |
| 1969 | Minsky and Papert's Perceptrons proves what single-layer networks cannot compute |
| mid-1970s | First AI winter: results fall short of promises, and funding is cut |
| 1980s | Expert-system boom; backpropagation is popularized (1986) |
| late 1980s–early 1990s | Second winter: expert systems prove brittle and costly to maintain |
| 1997 | IBM's Deep Blue defeats world chess champion Garry Kasparov |
| 2012 | AlexNet wins the ImageNet challenge: about 15% top-5 error vs 26% for the runner-up |
| 2016 | AlphaGo defeats Go champion Lee Sedol 4–1 |
| 2017–2022 | The transformer (2017), GPT-3 (2020), ChatGPT (2022) |
Learning wins, eventually
A rival tradition, connectionism, held that intelligence should be learned by networks of simple units. Frank Rosenblatt's perceptron learned to classify inputs by nudging its weights after every mistake. But a single perceptron can only draw one straight line through its inputs. Try it on two logic gates.
Networks with a hidden layer can compute XOR, and backpropagation, popularized in 1986, showed how to train them. Making them work on real problems also took large datasets and fast hardware such as GPUs. When all three came together in the early 2010s, deep learning swept speech and image recognition, and later language.
The math toolkit
Four kinds of math run through this whole course:
- Vectors: data as lists of numbers. A 28×28 grayscale image is a vector of 784 pixel values.
- Probability: probability measures uncertainty, and Bayes' rule updates it when evidence arrives.
- Derivatives: a derivative says how fast an output changes when you nudge an input. The gradient does this for many inputs at once.
- Optimization: learning means adjusting parameters to shrink a loss that scores the model's mistakes.
Combine the last two and you get gradient descent, the engine of modern machine learning. Measure the slope of the loss, then take a step downhill:
Take the loss , whose slope is . Start at with learning rate . Where is after one step?
Show the answer
2.4
The slope at is , so . Each step shrinks by 20%, gliding toward the minimum at . With the step would land at , farther from the minimum than where it started. Repeat that and you diverge.
| Hidden Layer lesson | What you will do there |
|---|---|
| Intelligent Agents & Environments | Classify environments, build reflex, model-based, goal-based and utility-based agents, and make "rational" precise with expected utility. |
| A Short History of AI | Follow the field from Dartmouth through the expert-system boom and two winters to deep learning, and ask why some ideas scaled. |
| The Math Toolkit of AI | Work with vectors, probability, gradients and optimization, and meet entropy and cross-entropy, the language of learning. |
Key takeaways
- AI can be defined by thinking or acting, measured against humans or against an ideal. Most of the field builds rational agents that act to maximize expected performance.
- Any AI system can be framed as an agent mapping percepts to actions; PEAS (performance, environment, actuators, sensors) pins down its task.
- Rational is not omniscient: a good decision can turn out badly, and changing the performance measure changes what is rational.
- AI has swung between hand-built knowledge (symbolic AI, expert systems) and learning from data (connectionism), with two winters along the way. Since about 2012, deep learning has dominated.
- The core math is vectors, probability, derivatives and optimization. Gradient descent combines the last two: step downhill on the loss.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
For an email spam filter, which of these is the performance measure?
- The text and headers of each incoming message
- Moving each message to the inbox or the spam folder
- The fraction of mail sorted correctly, with lost real mail counted as the worst error
- The stream of email arriving at the server
Show the answer
C. The fraction of mail sorted correctly, with lost real mail counted as the worst error
The performance measure is the designer's score for the agent's behavior. Here it is sorting accuracy, weighted by how costly each kind of mistake is.
What does the Turing test actually check?
- Whether a machine's text conversation can pass for a person's
- Whether a machine understands what it says
- Whether a machine reasons by correct logic
- Whether a machine maximizes its expected performance
Show the answer
A. Whether a machine's text conversation can pass for a person's
The test is purely behavioral and uses a human as the yardstick: "acting humanly". It says nothing direct about inner understanding or logical correctness.
Why could Rosenblatt's single-layer perceptron never learn XOR?
- It needed more training epochs
- Its learning rate was too large
- XOR has too many input combinations
- No single straight line separates XOR's 1s from its 0s
Show the answer
D. No single straight line separates XOR's 1s from its 0s
A single perceptron outputs 1 on one side of a line and 0 on the other. XOR's two 1s, (0, 1) and (1, 0), sit on opposite corners, so no line separates them from the 0s. A hidden layer fixes this.
While training a model, the loss jumps around and gets larger with every step. What is the most likely culprit?
- The learning rate is too small
- The learning rate is too large
- The loss has no minimum
- Gradient descent only works on straight-line models
Show the answer
B. The learning rate is too large
Each step overshoots the valley and lands higher up the other side, so the error grows. Lowering the learning rate usually cures it.
In the slippery grid world you change only the reward per step, and the agent's arrows change. Why?
- The world's physics changed
- The agent discovered new walls
- What counts as a good outcome changed, so the best actions changed
- Rational agents act randomly when rewards change
Show the answer
C. What counts as a good outcome changed, so the best actions changed
Walls, exits and the slip probability stayed the same. Changing the reward per step changes the performance measure, and a rational agent's best action depends on it.
Go deeper
- Intelligent Agents & Environments · Percepts, actions, rationality and the PEAS framework.
- A Short History of AI · From Dartmouth 1956 through two winters to the deep learning era.
- The Math Toolkit of AI · Vectors, probability, calculus and optimization in one place.
Further reading
- S. Russell & P. Norvig, Artificial Intelligence: A Modern Approach, 4th ed. (Pearson, 2020), chapters 1–2.
- A. M. Turing, "Computing Machinery and Intelligence," Mind 59 (1950), 433–460.