CST401 Module 1
CST401 Module 1
PEAS is a framework used in Artificial Intelligence to clearly define and specify an intelligent
agent's task environment. Because an agent's design depends heavily on the problem it
needs to solve, outlining the task environment using the PEAS framework is always the first
step in designing an intelligent agent.
The acronym stands for the four core elements of the environment:
● Performance Measure (P): The objective criteria used to define what the agent must
achieve and how its success is evaluated.
● Environment (E): The external conditions, entities, and situations the agent operates
within and interacts with.
● Actuators (A): The mechanisms (physical or digital) that determine how the agent
can act and influence its environment.
● Sensors (S): The tools and inputs the agent uses to perceive its environment and
gather available information for decision-making.
To illustrate how this framework is applied in practice, consider the PEAS description for an
automated taxi driver:
The PEAS framework is highly versatile and is used to describe the environments for all
types of agents, such as a medical diagnosis system (where the environment includes the
patient and hospital, and the performance measure is a healthy patient) or a part-picking
robot (which operates on a conveyor belt using cameras as sensors and a jointed arm as an
actuator).
Task environment properties
Task environment properties are the fundamental characteristics that categorize the
problem an intelligent agent must solve, directly influencing the agent's design,
decision-making strategies, learning requirements, and the choice of AI techniques used.
● Fully Observable: An environment where the agent's sensors give it access to the
complete, relevant state of the environment at all times. A chess board is a classic
example because the agent can see the exact position of every piece. This is
convenient because the agent does not need to maintain an internal memory of past
states to track the world.
● Partially Observable: The agent's sensors are noisy, inaccurate, or simply lack
certain information. For example, a self-driving taxi cannot observe the internal
intentions of other drivers. If an agent has no sensors at all, the environment is
completely unobservable.
● Single-Agent: Only one agent is making decisions and acting, so success depends
solely on its own behavior and the environment itself (e.g., a vacuum-cleaner robot
cleaning a room).
● Multi-Agent: Two or more agents operate in the same space, meaning one agent
must consider and predict the behavior of others. These environments can be
competitive (where agents have conflicting goals, like in chess) or cooperative
(where agents work toward a shared goal, like robots carrying a heavy object
together).
● Static: The environment does not change while the agent is taking time to think. This
removes time pressure, allowing the agent to analyze options comfortably, like when
solving a crossword puzzle.
● Dynamic: The environment changes continuously while the agent calculates its next
move, requiring rapid responses and constant monitoring (e.g., an autonomous taxi
dealing with moving pedestrians and changing traffic lights).
● Semidynamic: The physical environment remains static, but the agent's
performance measure drops as time passes, such as playing chess with a strict
timer.
● Known: The agent already understands the rules, outcome probabilities, and how
the environment works before it starts acting (e.g., the rules of Solitaire).
● Unknown: The agent does not fully grasp the rules or how actions affect the
environment, meaning it must actively explore and learn through experience, much
like a player trying a brand-new video game for the first time.
● Core Definition: A rational agent is an artificial intelligence system that perceives its
environment and takes actions to achieve the best possible outcome, or the best
expected result when dealing with uncertainty.
● Four Determinants of Rationality: At any given moment, what is considered
rational depends on four factors: the performance measure (the criteria defining
success), the agent's prior knowledge of the environment, the actions it is
capable of performing, and its percept sequence (its complete history of
observations).
● Maximizing Expected Performance: For every possible sequence of percepts, a
rational agent selects the action that is expected to maximize its performance
measure based on the evidence it has gathered and its built-in knowledge.
● Rationality vs. Omniscience (Perfection): Rationality does not equal perfection. An
omniscient agent magically knows the exact future outcome of every action, which is
impossible in the real world. A rational agent simply makes the best decision based
on the information it currently has available.
● Information Gathering and Exploration: A rational agent doesn't just act blindly; it
actively engages in information gathering and exploration. Sometimes, taking an
action specifically to gather more data (like scanning a room) is the rational choice
because it improves future decision-making.
● Learning and Autonomy: Because human designers cannot predict every possible
situation, rational agents must be autonomous and capable of learning. They rely on
their own experiences to adapt to changes, compensate for incorrect assumptions,
and improve their performance over time rather than strictly following predefined
rules.
Types of AI agents
Intelligent systems rely on different types of agent programs to process information and
decide on actions, with their behavior heavily dependent on their design. There are four
basic kinds of agent programs, along with a fifth adaptive type, that embody the principles of
AI:
● Simple Reflex Agents: These agents select their actions based entirely on the
current percept, completely ignoring any history of past observations. Because they
do not have memory to keep track of past world states, they operate purely on
predefined condition-action rules, such as "if the tail-light of the car in front is red,
then brake". However, they easily get confused in partially observable environments;
for example, if fog obscures a brake light, the agent cannot make the right decision
because it cannot remember what happened moments before.
● Model-Based Reflex Agents: Unlike simple reflex agents, these agents keep track
of the world by maintaining an internal state. They combine the current percept with
information from previous percepts and an internal model of how the environment
evolves and how their actions affect it. This ability to remember past states allows
them to function in partially observable environments. For instance, a vacuum agent
currently in Room A might not see Room B, but it can use its internal state to
remember that Room B was dirty and decide to move there.
● Goal-Based Agents: These agents possess goal information that describes
specific, desirable situations they want to achieve. They actively take future events
into consideration by asking what sequence of actions will help them reach their
goals, which involves AI subfields like search and planning. A self-driving taxi, for
example, evaluates possible routes and sequences of turns to successfully reach a
passenger's destination.
● Utility-Based Agents: While a goal-based agent only cares about the binary
outcome of whether a goal is achieved or not (a "happy" vs "unhappy" state), a
utility-based agent evaluates how well the goal is achieved. It uses an internal
utility function to assign a numerical value to different outcomes and chooses the
action that maximizes this expected utility. For example, a taxi might have three
routes to a destination; it will choose the route with the highest utility score by
optimally balancing travel time and safety.
● Learning Agents: While the behavior of the above agents is mostly predefined, a
learning agent can adapt and improve its performance over time by learning from
experience. A learning agent consists of four conceptual components:
○ The performance element selects the external actions.
○ The learning element makes improvements based on experience.
○ The critic evaluates the agent's performance and provides feedback.
○ The problem generator suggests exploratory actions to help the agent gain
new knowledge and experiences. An example is a self-driving taxi that initially
doesn't know the best routes, but after many trips, learns which roads are
congested and improves its efficiency and passenger comfort.
Agent Structure
To physically build or implement the intelligent AI systems we've been discussing, we must
understand their fundamental makeup. At its core, the structure of an intelligent agent is
defined by a simple but essential equation:
This means every agent requires both a platform to operate on and software to drive its
decisions. Here is a breakdown of these two critical components and how they interact:
1. The Architecture (The Platform) The architecture is the physical or virtual platform on
which the agent runs.
2. The Agent Program (The Decision-Maker) While the architecture provides the
hardware, the agent program is the actual software that processes the incoming information
and decides what to do.
● It is important to distinguish the program from the agent function. The agent function
is an abstract, mathematical concept—a theoretical mapping of every possible
sequence of past observations (percepts) to a specific action.
● The agent program is the concrete implementation of that function, written in code
and running on the architecture's physical systems.
The Importance of Compatibility A critical rule of agent structure is that the program must
be completely compatible with its architecture. An agent's software cannot perform actions
that its hardware does not support. For instance, an AI program can only issue flight
navigation commands to a delivery drone if the drone's physical architecture actually
includes motors, propellers, and flight controllers.
How They Operate Together The architecture and program interact in a continuous
five-step loop:
Because giant lookup tables fail in the real world, modern AI solves this structural problem
by building compact algorithms. Instead of storing pre-written answers, the agent program
uses logic, search algorithms, and machine learning to actively reason and generate
intelligent behavior on the fly.
Learning Agent
A learning agent is an intelligent agent designed to improve its performance over time by
learning from its experiences. Unlike simple reflex, goal-based, or utility-based agents that
operate based on predefined behaviors and rules, a learning agent can adapt to its
environment and become more capable as it interacts with the world.
To achieve this adaptability, a learning agent is structurally divided into four distinct
conceptual components:
A practical example of a learning agent is a self-driving taxi. When it first starts operating, it
might not know the absolute best routes to take. However, after completing many trips, it
uses its learning components to discover which roads are typically congested, which
alternative routes are faster, and how to drive in a way that maximizes passenger comfort.
Through this continuous loop of acting, evaluating, and exploring, the taxi's overall
performance steadily improves over time.
Turing Test
Proposed by Alan Turing in 1950, the Turing Test provides an operational definition of
intelligence by focusing on whether a machine can "act humanly".
The test is conducted by having a human interrogator communicate with both a human and
an AI system over a text-only channel. Both the machine and the human attempt to act like a
human during the conversation. A computer successfully passes the test if the human
judge cannot distinguish the machine's written responses from those of the human.
To pass this standard, text-based Turing Test, an AI system must be equipped with four core
capabilities:
Because the original test relies entirely on text, it intentionally avoids testing physical
intelligence or interaction. To evaluate an AI's ability to act humanly in the physical world, the
Total Turing Test was introduced. This extended version adds video input and physical
interaction, meaning the system must possess two additional capabilities to pass:
● Computer Vision: To perceive, interpret, and recognize visual objects within the
environment.
● Robotics: To move, navigate, and physically manipulate objects in its surroundings.
Foundations of AI
The foundations of Artificial Intelligence were not built in isolation; rather, the field was
developed step by step by integrating ideas, theories, and techniques from a wide variety of
other disciplines.
Here are the key foundational fields that shaped the development of intelligent machines:
● Philosophy: Philosophy asked the fundamental questions about how the mind works
and where knowledge comes from. It gave AI the concept of reasoning rules, derived
from Aristotle's systematic study of logic. His concepts of deductive thinking
(reaching specific conclusions from general truths) and inductive thinking (learning
general rules from specific examples) laid the groundwork for modern rule-based
reasoning (if-then logic) and machine learning.
● Mathematics: If philosophy taught AI how to think logically, mathematics gave it the
language to calculate, reason, and find patterns in data. Mathematics provided the
concept of the algorithm—first recorded by Euclid—which is a clear set of
instructions used by every AI system today. It also introduced Boolean logic
(George Boole's 1/0, True/False system), which forms the basis of all computer
circuits and decision-making in machines.
● Economics: Economics studies how to make optimal choices when resources are
limited, which directly applies to AI agents. It contributed to AI's ability to plan under
uncertainty and deal with multi-agent scenarios where different entities have
competing goals. Crucially, it introduced Expected Utility Theory (from Daniel
Bernoulli), which helps AI agents choose actions that maximize their expected
benefits while considering risks.
● Neuroscience: The study of the human brain and nervous system directly inspired
the creation of Artificial Neural Networks (ANNs). By understanding how neurons
communicate and strengthen connections to learn and store memories, AI
researchers developed the foundations of modern Machine Learning and Deep
Learning. Neuroscience also paved the way for "affective computing," allowing AI to
recognize and respond to human emotions.
● Psychology: By studying how humans learn, remember, perceive, and make
decisions, psychology provided the blueprint for building machines that can mimic
these cognitive processes. For example, human perception inspired AI capabilities
like computer vision and speech recognition.
● Computer Engineering: This field acts as the physical and software backbone of AI.
It provides the powerful hardware necessary for complex computations—such as
CPUs, GPUs, and specialized TPUs—as well as the software frameworks (like
TensorFlow) and programming languages needed to bring AI theories to life.
● Control Theory and Cybernetics: This discipline focuses on systems that monitor
and regulate themselves. It introduced the concept of the feedback loop, where a
system continuously observes its environment, compares its current state to its goal,
and takes corrective action. This allows AI systems to learn from errors, adapt, and
operate autonomously.
● Linguistics: The study of human language and grammar (heavily influenced by
Noam Chomsky's work on syntax) led to the development of Computational
Linguistics. This forms the basis of Natural Language Processing (NLP), enabling
AI systems like chatbots, voice assistants, and translation tools to understand,
interpret, and generate human language.
AI Applications
Artificial Intelligence has progressed from purely theoretical research into practical
technologies that are embedded in our everyday lives. Today's modern AI systems are
applied across numerous fields by leveraging their ability to perceive environments, learn
from data, solve complex problems, and make autonomous decisions.
Human Intelligence vs AI
Here is how Human Intelligence and AI compare across various cognitive and physical
dimensions:
● Perception (Sensors): A human agent perceives the world naturally using biological
sensory organs like eyes, ears, skin, and nose. In contrast, an AI robotic agent relies
on digital and mechanical devices like cameras, microphones, infrared sensors, and
GPS receivers, while a software agent relies on keyboard entries, files, and network
packets.
● Action (Actuators): Humans act upon their environment using body parts like
hands, legs, speech, and facial expressions. AI agents physically interact through
motors, wheels, and robotic arms, or digitally through displaying information and
sending database commands.
● Human Brain: Humans learn through continuous practice and physical experiences,
storing these experiences as memories created by strengthening connections
between biological neurons.
● AI Systems: AI relies on Artificial Neural Networks (ANNs) inspired by the brain, but
it learns by ingesting massive amounts of training data. It stores past data and uses it
to mathematically improve performance over time.
3. Perception and Pattern Recognition While both humans and AI can recognize faces,
voices, and objects, their underlying processes differ significantly:
● Information Collection: Humans see a face with their eyes and hear voices with
their ears, whereas AI captures an image using a camera.
● Feature Extraction: The human brain naturally notes holistic shapes, smiles, and
hairstyles. AI uses computer vision to detect specific mathematical features, such as
eye distance, jawline, and nose shape.
● Pattern Conversion & Recognition: Human neurons store a unique pattern of
connections to remember a friend. AI converts the extracted features into numbers (a
"vector") and later compares new vectors with stored mathematical patterns to find a
match.
● Human Thinking: Humans evaluate options based on logic, intuition, and complex,
environment-specific behaviors that are notoriously difficult to fully model. AI
researchers study this through "Cognitive Modeling," using introspection,
psychological experiments, and brain imaging to understand human thought and
attempt to program machines to mimic it.
● AI Decision Making: AI selects the best actions using hard data, algorithms, and
logical rules. It leverages Boolean logic (True/False or 1/0) to evaluate conditions and
mathematical probabilities to assess risk and maximize expected benefits.
The Shift Toward Rationality Early AI research placed heavy emphasis on the Turing Test
and the "Thinking/Acting Humanly" approaches, striving to make machines that could
successfully fool human judges into believing they were interacting with another person.
However, because human behavior is incredibly complex and sometimes irrational, modern
AI research predominantly focuses on the Rational Agent Approach. Instead of simply
mimicking human thought, modern AI focuses on acting optimally to achieve predefined
goals efficiently, even if its decision-making process looks completely different from how a
human would solve the problem.
History of AI
The history of Artificial Intelligence detailed in the sources traces the evolution of AI from
ancient philosophical concepts to modern technological milestones. While the sources do
not provide a complete chronological timeline of the AI industry (such as the 1956 Dartmouth
Workshop or the historical "AI winters" that are often taught), they highlight the key historical
breakthroughs that built the field:
● Ancient Foundations in Logic and Algorithms: The earliest roots of AI began with
the Greek philosopher Aristotle, who is considered the father of logic. He developed
Formal Logic and syllogisms (e.g., Deductive and Inductive thinking)—the
structured, step-by-step reasoning that forms the basis of modern rule-based AI.
Ancient mathematics also contributed when Euclid recorded the first known
algorithm (a method to find the Greatest Common Divisor), providing the core
concept of clear, step-by-step instructions used by every AI system today.
● 18th and 19th Century Mathematics and Economics: In 1738, Daniel Bernoulli
introduced Expected Utility Theory, and in 1776, Adam Smith outlined theories on
rational choices and maximizing benefits. These economic concepts later became
essential for programming AI agents to assess risks and make optimal decisions. In
the 1800s, George Boole created Boolean Algebra, establishing the 1/0
(True/False) system that acts as the foundation for all modern computer circuits and
machine decision-making. By the 19th century, logicians had created precise
symbolic notations to mathematically represent objects, facts, and rules.
● Mid-20th Century Definitions and Cybernetics: The modern concept of AI began
taking shape in 1950 when Alan Turing proposed the Turing Test, providing the first
operational definition of machine intelligence by testing if a computer could
successfully mimic human written communication. During this era, Norbert Wiener
pioneered Cybernetics, proposing that intelligent systems use feedback loops to
correct actions and self-regulate, which laid the groundwork for machine learning and
autonomous systems. Additionally, in 1957, Noam Chomsky's theories on language
rules and syntax inspired computational linguistics, enabling the birth of Natural
Language Processing (NLP).
● Early Computing Achievements (1960s): Driven by the "Laws of Thought"
approach, AI saw significant practical computing success early on. By 1965,
computer programs existed that could systematically solve logically described
problems, automatically derive conclusions, and prove mathematical statements.
● Modern Milestones: As AI systems became capable of evaluating massive search
spaces and probabilities, they reached major landmark achievements. A famous
example of strategic AI success occurred when IBM's Deep Blue computer defeated
World Chess Champion Garry Kasparov by evaluating millions of moves per second.
In 2005, AI proved its capability in physical, dynamic environments when STANLEY,
an autonomous robotic vehicle, successfully navigated roads without human
intervention to win the DARPA Grand Challenge.
AI Classifications
The definitions and approaches to Artificial Intelligence are classified along two major
dimensions:
● Thinking vs. Acting: This dimension contrasts AI that focuses on internal thought
processes and reasoning with AI that focuses on external behavior and actions.
● Human-like vs. Rational: This dimension contrasts systems where success is
measured by their similarity to human performance with systems where success is
measured by an ideal, optimal performance called rationality.
1. Acting Humanly (The Turing Test Approach) This classification focuses on machines
behaving intelligently enough to mimic human performance. Proposed by Alan Turing in
1950, the success of this approach is evaluated using the Turing Test, where an AI system
attempts to communicate via text well enough that a human judge cannot distinguish it from
a real human.
2. Thinking Humanly (The Cognitive Modeling Approach) This approach aims to develop
computer programs that replicate actual human thought processes, reasoning, and
decision-making. To accurately build these systems, AI researchers must first understand
how the human mind works by utilizing introspection, psychological experiments, and brain
imaging techniques.
3. Thinking Rationally (The Laws of Thought Approach) Based on the idea that
intelligent systems should follow the strict laws of logic, this approach focuses on correct,
formal reasoning. Stemming from Aristotle's development of syllogisms, it aims to build AI
that systematically applies logical rules to facts in order to automatically derive completely
valid and correct conclusions.
4. Acting Rationally (The Rational Agent Approach) This is currently the most widely
accepted approach in modern AI. Instead of trying to perfectly mimic human thought, this
classification focuses on designing rational agents—systems that perceive their
environment and select actions that maximize their expected success and best achieve their
goals. This approach is favored because it is more general than pure logic; an agent can act
rationally through logical reasoning, but also through learning, probabilistic decision-making,
or even immediate reflex actions when necessary.
Well Defined AI Problem
Based on the provided sources, the problem that an intelligent AI agent must solve is
defined by its task environment. Therefore, to establish a well-defined AI problem, the very
first step in designing an agent must always be to specify its task environment as fully and
clearly as possible.
The sources explain that a problem is fully specified using the PEAS framework, which
outlines the four core elements of the task environment:
● Performance Measure (P): Defines what the agent must achieve by providing an
objective criterion for success.
● Environment (E): Identifies the external world, conditions, and entities the agent will
interact with.
● Actuators (A): Determines exactly how the agent is capable of acting to influence its
environment.
● Sensors (S): Identifies the information and inputs available to the agent to perceive
its surroundings.
By clearly defining these four elements, designers can systematically understand the
problem the agent is facing. Furthermore, the modern Rational Agent Approach to solving
these problems is considered "scientifically well defined" because it relies on mathematical
principles and objective performance measures rather than attempting to mimic the highly
complex and unpredictable nature of human behavior.