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

AI-Lec04-add-slides-up

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

AI-Lec04-add-slides-up

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

RMIT Classification: Trusted


Artificial Intelligence

Week 4: Knowledge representation


and reasoning

COSC2129
RMIT Classification: Trusted

Material

• Chapter 7, Book: Artificial Intelligence: A Modern


Approach Global edition

• Book - TOC of Artificial Intelligence: A Modern Approach,


4th Global ed.
• AIMA: Pseudo code
• Good practices Python
RMIT Classification: Trusted

Recap: Problem solving by search

• Path finding problem

• Problem solving by search


– Uninformed search
– Informed search
RMIT Classification: Trusted

Recap: Problem solving by search

Adversarial search
– Minimax
– Alpha-beta pruning
– Heuristics function
RMIT Classification: Trusted

Problem solving by search

• Can the agent deduce that 2 tiles cannot occupy the same space?
• Does it have an internal structure?
• Can it infer new knowledge from its current knowledge?

=> We need to build a better agent!


RMIT Classification: Trusted

Knowledge & Reasoning

http://mygreatlearning.com/blog/what-is-knowledge-representation/
RMIT Classification: Trusted

Knowledge & Reasoning

• Knowledge representation: How do humans


represent and store knowledge?
• Reasoning: How do humans do reasoning?
• How to transfer human knowledge to an agent?

• To be intelligent, an agent needs a knowledge


base to store knowledge and an inference
engine to do the reasoning.
RMIT Classification: Trusted

Agents and Environments

• Agent: “anything that can be viewed as perceiving its environment


through sensors and acting upon that environment through
actuators” (Russel & Norvig, 2009)
• Human Agent
• Sensors: eyes, ears, other organs
• Actuators: hands, legs, vocal tract, others
• Robotic Agent
• Sensors: cameras, sonar
• Actuators: motors

• Rational Agent
• For each possible percept sequence, a rational agent should
select an action that is expected to maximize its performance
measure, given the evidence provided by the percept sequence
and whatever built-in knowledge the agent has.
RMIT Classification: Trusted

Knowledge representation
Example
• KB:
– If it did not rain then Tom played tennis
– Tom could play tennis or pingpong, but not
both
– Tom played pingpong.
• What can be inferred?
– Tom did not play tennis.
– It rained.
–…
RMIT Classification: Trusted

Knowledge representation

• Sentence:
– A statement/ assertion/ fact about the world in a
knowledge representation language

Example
– It was raining True/false
– Today is Friday False
– He passed the exam T/F
– x + y > 5, ?
– x = 3, y=4 True
RMIT Classification: Trusted

Knowledge representation

• Proposition symbols: Letters: A, B, C, P, Q,…


– Each letter represents one statement/fact about the world
– P: It rained
– Q: Tom played tennis
– R: If it did not rain, then Tom played tennis
Those are atomic sentences → Connect them
RMIT Classification: Trusted

Knowledge representation

• Proposition symbols: Letters: A, B, C, P, Q,…


– Each letter represents one statement/fact about the world
– P: It rained
– Q: Tom played tennis
– R: If it did not rain, then Tom played tennis
Those are atomic sentences → Connect them
R: ~P → Q
• Logical connectives: Not, And, Or,…
RMIT Classification: Trusted

Knowledge Bases

• Knowledge Base = set of sentences in a formal language


• Declarative approach to build an agent:
– Tell it what it needs to know (from the environment)
– Ask what to do, answers should follow from the KB
(actions)
– Perform action.
RMIT Classification: Trusted

Knowledge-based Agent

• The agent must be able to:


– Represent states, actions, etc.
– Incorporate new percepts
– Update internal representations of the world
– Deduce hidden properties of the world
– Deduce appropriate actions

Fig. https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8283595
RMIT Classification: Trusted

The Wumpus World

• Used as examples for Knowledge


Representation, Reasoning, and Planning.
RMIT Classification: Trusted

Applications

• Expert systems

• FAQs
• Troubleshooting guides
• How-to articles
• User manuals

• Video: AI - Knowledge Based Systems


RMIT Classification: Trusted

Conjunctive normal form (CNF)

• It is a conjunction of one or more clauses, where


each clause is a disjunction of literals

(P1 V P2 V… V Pn) /\ (Q1 V Q2 V… V Qm) /\ …(…V… V…)

Example:
RMIT Classification: Trusted


RMIT Classification: Trusted

Propositional Resolution
RMIT Classification: Trusted

• Example: Prove P given the following


RMIT Classification: Trusted

Question?

You might also like