Lesson 1.2~15 min

Types of AI Agents

Module 1: Introduction to AI Agents

Types of AI Agents

AI agents can be classified into five main categories based on their complexity and capabilities.

1. Simple Reflex Agents

The simplest type. They act only based on the current percept, ignoring history.

  • Use condition-action rules (if-then)
  • No memory of past states
  • Example: A thermostat, a basic spam filter
def simple_reflex_agent(percept):

if percept["temperature"] < 20:

return "turn_on_heater"

else:

return "turn_off_heater"

2. Model-Based Reflex Agents

Maintain an internal model of the world to handle partially observable environments.

  • Track how the world evolves
  • Remember past states
  • Example: A robot that remembers where obstacles were

3. Goal-Based Agents

Have explicit goals and choose actions that lead toward achieving them.

  • Can plan ahead
  • Consider future consequences of actions
  • Example: A GPS navigation system finding the shortest route

4. Utility-Based Agents

Maximize a utility function — not just achieve a goal, but achieve it in the best way.

  • Compare different outcomes
  • Handle trade-offs between competing goals
  • Example: A trading bot maximizing profit while minimizing risk

5. Learning Agents

Can improve their performance over time through experience.

  • Have a learning element that modifies behavior
  • Have a critic that evaluates performance
  • Example: AlphaGo, recommendation systems, ChatGPT

Comparison Table

TypeMemoryGoalsLearningComplexity
Simple ReflexNoNoNoLow
Model-BasedYesNoNoMedium
Goal-BasedYesYesNoMedium-High
Utility-BasedYesYes (optimized)NoHigh
LearningYesYesYesHighest

Key Takeaways

  • Agent types form a hierarchy of increasing sophistication
  • Most modern AI agents are learning agents or utility-based agents
  • The choice of agent type depends on the problem complexity and environment

Test Your Knowledge

5 randomized questions from a pool of 10. Pass with 60% to unlock the next lesson.