0% found this document useful (0 votes)
2 views

Lecture 2 - Perception, Intelligence and Reasoning

The document discusses the concepts of perception, intelligence, and reasoning in artificial agents, detailing their architecture, types, and the nature of environments they operate in. It covers various types of agents, including simple reflex, model-based, goal-based, utility-based, and learning agents, as well as classification algorithms and knowledge-based systems. Additionally, it explores propositional and first-order logic, their syntax, semantics, and applications in AI.

Uploaded by

enochmack04
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 2 - Perception, Intelligence and Reasoning

The document discusses the concepts of perception, intelligence, and reasoning in artificial agents, detailing their architecture, types, and the nature of environments they operate in. It covers various types of agents, including simple reflex, model-based, goal-based, utility-based, and learning agents, as well as classification algorithms and knowledge-based systems. Additionally, it explores propositional and first-order logic, their syntax, semantics, and applications in AI.

Uploaded by

enochmack04
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

PERCEPTION,

INTELLIGENCE AND
REASONING
DR REGINA ESI TURKSON
Agent and Structure
Agent: An agent is anything that can be viewed as
perceiving its environment through sensors and acting
upon that environment through actuators.
Artificial Agent
A computer program or system that is programmed to
observe its surroundings, make decisions, and perform
actions in order to accomplish a particular objective or set
of goals. Eg:
Sensors: perceiving its environment
Actuator: acting upon
Examples of agents: Intelligent personal assistant,
Autonomous robots, Gaming agent, Fraud detection agent,
Traffic management agent, software agent, Human-agent.
Terminologies
Percept:
Percept Sequence:
Agent function:
Agent program:
NB: program,agent function and agent
program
Structure of an AI agent
Architecture and Agent programs
Agent = Architecture + Agent Program
Architecture is the machinery that the agent executes on
The Concept of Rationality
◦ Rationality, rational agents, artificial intelligence

What is rational at any given time depends on four things:


The performance measure that defines the criterion of success.
The agent’s prior knowledge of the environment.
The actions that the agent can perform.
The agent’s percept sequence to date.
The Nature of Environments
Task environment
PEAS (Performance, Environment, Actuators, Sensors)
Properties of Task Environments
Fully observable vs. Partially observable:
Deterministic vs. Stochastic: The environment is said to be deterministic if the next state is totally determined by the current state and
the action taken by the agent; otherwise, it is stochastic.
Episodic vs. Sequential:
Static vs. Dynamic: In a static environment, the environment does not change while the agent is deciding on its actions. Dynamic
environment, the environment can change during the decision-making process, and the agent must adapt to these changes.
Discrete vs. Continuous: A discrete environment involves a finite or countable number of states and actions, while a continuous
environment has an infinite number of possible states and actions.
Single-Agent vs. Multi-Agent: A single-agent environment only one autonomous agent operating within it. Multi-agent environment;
multiple agents, each pursuing its own objectives.
Competitive vs. Cooperative: competitive environment: the agents have conflicting objectives, and their actions may directly oppose
each other. Cooperative environment: agents work together to achieve a common goal.
Types of Agents
Simple Reflex Agents
 Model-Based Reflex Agents
Goal-Based Agents
Utility-Based Agents
Learning Agents
Simple Reflex Agents
Problems with Simple reflex agents are:
Very limited intelligence.
No knowledge of non-perceptual parts of the state.
Usually too big to generate and store.
The collection of rules needs to be updated if there occurs any change in the environment.
Model-Based Reflex Agents
It operates by finding a rule whose condition corresponds to the current situation.
The agent keep track of the internal state that is altered by each percept and is determined by the
percept history.
The present state is saved within the agent, which keeps some form of structure characterizing the
part of the environment that cannot be examined.
Goal-Based Agents
These agents make decisions based on how close they are
to achieving their goal (description of desirable situations).
Every action they take is designed to bring them closer to
the goal.
This gives the agent the ability to choose from numerous
options, selecting the one that leads to the desired state.
The knowledge that underlies their decisions is explicitly
represented and modifiable, allowing these agents to be
more adaptable.
Utility-Based Agents
Utility-based agents are agents that are created with
their end utilization as building blocks in mind.
When there are numerous feasible choices, utility
based agents are employed to determine which one is
best.
They choose actions for each state based on a
preference (utility).
It seek a faster, safer, and less expensive route to
destination.
chooses the action that maximizes the expected utility.
The utility specifies how "happy" the agent is.
A utility function converts state into a real number that
describes the degree of happiness associated with that
state.
Learning Agent
Learning agent is a sort of agent that can learn from its prior
experiences or has learning capabilities.
It begins by acting with minimal information and subsequently
learns to act and adapt automatically.
Four Conceptual Components
The learning element is in charge of producing changes by learning
from the surroundings.
Critic: The learning element receives feedback from critics that
explains how well the agent is performing in comparison to a
predefined performance criterion.
Performance element: It is in charge of deciding on external action.
Problem generator: This component is in charge of recommending
actions that will lead to novel and educational experience
ARTIFICIAL INTELLIGENCE
ALGORITHMS
Classification Algorithms
Classification is the act of categorizing the dependent variable and then predicting a class for a given
input.
It falls under the domain of Supervised Machine Learning
Regression Algorithms
Clustering Algorithms
Classification algorithms
Classification Algorithms
Classification algorithms
Naive Bayes
Decision Tree
Random Forest
Logistic Regression
Support Vector Machines
K Nearest Neighbours
Linear Regression
K-Means Clustering
BASIC PRINCIPLES OF AI TOWARD PROBLEM SOLVING,
INFERENCE, AND KNOWLEDGE REPRESENTATION
Knowledge-based
These agents can use formal representations of the world to act intelligently
two major components
• Knowledge base
• Inference system.

The architecture of knowledge-based system


Inference System
Inference is the process of creating new sentences from existing ones.
Inference system
Two Primary Rules of Inference system:
Forward chaining
Backward chaining

Forward chaining is a bottom-up approach to reasoning and inference. It starts with the given
data or facts and uses rules and logic to derive new conclusions or reach a goal.
Forward chaining
Step 1: Initially, the system has a set of known facts or data.
Step 2: It matches these facts against the antecedents (conditions) of the rules to find a rule
whose conditions are satisfied by the available data. Step
3: Once a rule with fulfilled conditions is found, its consequent (action) is executed, adding new
facts to the data pool.
Step 4: The process continues iteratively, applying rules and generating new facts until no more
rules can be executed or until a specific goal is reached.
Backward Chaining
Backward chaining is a top-down approach to reasoning and inference.
How backward chaining works:
Step 1: The system starts with a specific goal or query.
Step 2: It looks for rules or conditions that have the goal as a consequent (action).
Step 3: Once a rule with the desired goal as the consequent is found, it checks if the antecedents
(conditions) of the rule can be satisfied using the available data.
Step 4: If the antecedents can be fulfilled, the goal is considered proven and the process stops.
Step 5: If the antecedents cannot be satisfied directly, the system recursively treats the
antecedents as new goals and repeats the process until it finds the necessary data to support
the original query.
Approaches to designing a
knowledge-based agent
There are mainly two approaches to build a knowledge-based agent:
Declarative approach: starts with an empty knowledge base and telling the agent which
sentences to start with.
Procedural approach: develop a program that already encodes the desired behavior or agent.
The three main Levels of
knowledge-based agent
Knowledge Level: We specify what the agent knows and what the agent's goals are. We can modify
its behavior using these specifications. Eg. Assume an automated taxi agent needs to travel from
station A to station B, and he knows the route from A to B, then this falls under the knowledge level.
Logical Level: At the logical level, knowledge is encoded into logical statements. At the logical level
we can expect to the automated taxi agent to reach the destination B.
Implementation Level: This is the physical representation of logic and knowledge. At the
implementation level agent perform actions as per logical and knowledge level. At this level, an
automated taxi agent actually implements his knowledge and logic so that it can reach to the
destination.

NB: Relation between Knowledge and Intelligence


AI knowledge cycle:
An Artificial intelligence system has the following components for displaying intelligent behavior
Perception
Learning
Knowledge Representation and Reasoning
Planning o Execution
PROPOSITIONAL LOGIC
IN AI
PROPOSITIONAL LOGIC IN AI
Consider the following statement: "All humans are mortal.“In propositional logic, this is
represented as a proposition, say P.
The proposition "Socrates is a human" can be expressed as another proposition, say Q.
P and Q's logical relationship can be described using logical connectives such as "and," "or,"
and "not.“
 For example, "All humans are mortal, and Socrates is a human" can be expressed as P ∧ Q.
There are five connectives in
common use
¬ (not): A sentence such as ¬Q (Q). A literal is either an atomic sentence (a positive literal) or a
negated atomic sentence (a negative literal).
∧ (and): A sentence whose main connective is ∧, such as W ∧ P, is called a conjunction; its
parts are the conjuncts. ( “A” for “And.”)
∨ (or): A sentence using ∨, such as (Q∧P) ∨ R is a disjunction of the disjuncts (Q ∧ P) and R
⇒ (implies): A sentence such as (Q∧P) ⇒ ¬R is called an implication (or conditional). Its
premise or antecedent is (Q∧P), and its conclusion or consequent is ¬R. Implications are also
known as rules or if–then statements. The implication symbol : (⊃ or →).
⇔ (if and only if): The sentence Q ⇔ ¬R is a biconditional. Some other books write this as ≡.
For complex sentences, we have five rules, which hold for any sub-sentences P and Q in any
model m (here “iff” means “if and only if”):
• ¬P is true iff P is false in m.
• P ∧ Q is true iff both P and Q are true in m.
 • P ∨ Q is true iff either P or Q is true in m.
• P ⇒ Q is true unless P is true and Q is false in m.
• P ⇔ Q is true iff P and Q are both true or both false in m.
Truth table with Three
Propositions
Truth table is a tool used to calculate the true value of a compound proposition based on the truth
values of each of its constituent propositions
Logical Equivalence
Logical equivalency in propositional logic is a relationship between two propositional formulas
that says the two formulas have the same truth value in all possible instances.
The sign "≡" or "iff" (if and only if) represents this relationship.
If two propositional formulae are always true or always false together, they are logically
equivalent.
For example, the propositional formulas "P ∧ Q" and "Q ∧ P" are logically equivalent because
they have the same truth value for all possible values of P and Q.
Similarly, "¬(P ∨ Q)" and "(¬P) ∧ (¬Q)" are logically equivalent.
Types of propositions based on
Truth values
There are three types of propositions when classified according to their truth values.
1. Tautology – A proposition which is always true.
2. Contradiction – A proposition which is always false.
3. Contingency – A proposition that is neither a tautology nor a contradiction
Example,
1. PvP is a tautology.
2. P^¬P is a contradiction.
3. PvQ is a contingency
Basic Established Logical
Equivalence

Logical equivalence aside conjunction and disjunction


Examples: 1. Show that ¬(p=>q) ≡ p∧¬q Considering LHS

2. Show that ¬(p v (¬p ∧ q)) ≡ ¬p∧¬q Considering the LHS


Propositional Logic's Limitations
Propositional logic has a limited ability to represent complex relationships between things or
concepts. Only simple propositional statements with binary truth values (true/false) can be
expressed. This makes notions like uncertainty, ambiguity, and vagueness difficult to portray.
Inability to accommodate quantifiers: Propositional logic cannot handle quantifiers like "all" or
"some." It cannot, for example, express the phrase "all humans are mortal" concisely. This makes
reasoning about groups of things or concepts challenging. Propositional logic cannot reflect
relations like ALL, SOME, or NONE.
Example: a. All the girls are intelligent.
b. Some apples are delicious.
FIRST-ORDER LOGIC IN AI
The two main parts first-order logic: Semantics, Syntax
Syntax
In first-order logic, the syntax of FOL determines which collection of symbols represents a logical
expression. In FOL, we write statements in shorthand notation.
Basic Elements of First-order logic:
Atomic sentences:
Complex sentences:
First-order logic statements can be divided into two parts:
Subject: Subject is the main part of the statement.
Predicate: A predicate can be defined as a relation, which binds two atoms together in a
statement.
Quantifiers in First-order logic The De Morgan rules for quantified and
unquantified sentences are as follows:
1. Universal Quantifier, (for all, everyone, everything) ”∀”
2. Existential quantifier, (for some, at least one). “∃” ∀ x ¬P ≡ ¬∃ x P
• ¬∀ x P ≡ ∃ x ¬P
Existential quantifiers are the type of quantifiers, which
• ∀ x P ≡ ¬∃ x ¬P
express that the statement within its scope is true for
at least one instance of something. • ∃ x P ≡ ¬∀ x ¬P
• ¬(P ∨ Q) ≡ ¬P ∧ ¬Q
Nested Quantifiers • ¬(P ∧ Q) ≡ ¬P ∨ ¬Q
• P ∧ Q ≡ ¬(¬P ∨ ¬Q)
• P ∨ Q ≡ ¬(¬P ∧ ¬Q)
LOGIC AND ITS APPLICATION
LOGIC AND ITS APPLICATION
Logic is the systematic study of the principles of reasoning and inference, with the primary objective of
distinguishing between valid and invalid arguments.
A logic must also define the semantics or meaning of sentences.
The semantics defines the truth of each sentence with respect to each possible world.
Eg. M + N = 4

Branches of logic
Modal Logic:
Fuzzy Logic:
Temporal Logic:
Applications of logic
Automated Discovery in Science
Inductive Programming
Automation of Mathematical Reasoning: Knowledge Representation
Inference and Reasoning
Expert Systems
Natural Language Processing (NLP)
Robotics
Game Playing

You might also like