0% found this document useful (0 votes)
5 views4 pages

Expanded KR AI Notes

Knowledge Representation (KR) is crucial for AI as it enables reasoning, problem-solving, communication, and adaptation. Knowledge-Based Agents utilize a Knowledge Base and Inference Engine to make informed decisions through logical reasoning. Propositional Logic and First-Order Logic are key components in representing knowledge, with the Wumpus World serving as a practical example for demonstrating AI decision-making under uncertainty.

Uploaded by

tejasky27
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 views4 pages

Expanded KR AI Notes

Knowledge Representation (KR) is crucial for AI as it enables reasoning, problem-solving, communication, and adaptation. Knowledge-Based Agents utilize a Knowledge Base and Inference Engine to make informed decisions through logical reasoning. Propositional Logic and First-Order Logic are key components in representing knowledge, with the Wumpus World serving as a practical example for demonstrating AI decision-making under uncertainty.

Uploaded by

tejasky27
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

Expanded Notes on Knowledge Representation and Logic in

AI

Importance of Knowledge Representation

Knowledge Representation (KR) is the process of storing and organizing knowledge in a structured form so that AI
systems can understand and use it. It acts as the backbone of Artificial Intelligence because machines cannot think or
reason without properly represented knowledge.

1. Enables Reasoning and Inference:


KR allows AI systems to derive new facts from existing information using logical reasoning. For example, if the system
knows “All birds can fly” and “Parrot is a bird,” then it can infer that “Parrot can fly.” This ability makes AI systems
intelligent.

2. Facilitates Problem Solving:


AI systems use KR in medical diagnosis, robotics, and expert systems to analyze situations and choose suitable
actions. Proper knowledge representation helps systems solve complex real-world problems efficiently.

3. Enhances Communication and Interpretation:


In Natural Language Processing (NLP), KR helps computers understand human language. It converts natural
language into logical structures that computers can process and interpret correctly.

4. Supports Learning and Adaptation:


AI systems continuously receive new information. KR allows the knowledge base to update itself, helping systems
adapt to changing environments and improve performance over time.

Knowledge-Based Agent

A Knowledge-Based Agent is an intelligent system that stores knowledge about the world and uses logical reasoning
to make decisions. Unlike simple reflex agents, it does not react blindly to inputs.

Components of Knowledge-Based Agent:

1. Knowledge Base (KB):


The KB stores facts, rules, and relationships about the environment. It acts as the memory of the system.

2. Inference Engine:
The inference engine applies logical rules to the knowledge base and derives new conclusions.

Operations:
• TELL: Adds new information to the KB.
• ASK: Queries the KB to obtain answers or decisions.

Working Cycle:
Perceive → Infer → Act → Learn.
The agent observes the environment, reasons using the KB, performs actions, and updates its knowledge.

Propositional Logic
Propositional Logic is the simplest form of logic used in AI. It represents knowledge using propositions that are either
True or False.

Example:
P = “It is raining.”
Q = “Road is wet.”

Logical Connectives:

1. Negation (¬):
Represents NOT operation.
Example: ¬P means “It is not raining.”
If P is true, then ¬P becomes false.

2. Conjunction (∧):
Represents AND operation.
Example: P ∧ Q means “It is raining AND road is wet.”
The statement is true only when both P and Q are true.

3. Disjunction (∨):
Represents OR operation.
Example: P ∨ Q means “It is raining OR road is wet.”
The statement is true if at least one statement is true.

4. Implication (⇒):
Represents IF–THEN relation.
Example: P ⇒ Q means “If it rains, then road is wet.”
It is false only when P is true and Q is false.

5. Biconditional (⇔):
Represents IF AND ONLY IF relation.
Example: P ⇔ Q means both statements have the same truth values.

Semantics of Propositional Logic

Semantics gives meaning to logical symbols and sentences. It determines whether statements are true or false.

Model:
A model is a set of truth value assignments.
Example:
P = True
Q = False

Truth Conditions:
• ¬P is true if P is false.
• P ∧ Q is true only if both are true.
• P ∨ Q is true if one or both are true.
• P ⇒ Q is false only when P is true and Q is false.
• P ⇔ Q is true when both statements have the same truth value.

Truth tables are used to evaluate logical expressions systematically.

First-Order Logic (FOL)


First-Order Logic is more advanced and expressive than propositional logic. It can represent objects, properties,
relationships, and general rules.

Example:
“All humans are mortal.”

FOL Representation:
∀x (Human(x) ⇒ Mortal(x))

Strengths of FOL:
• Represents relationships between objects.
• Supports generalized reasoning.
• Represents large amounts of knowledge compactly.
• Useful in expert systems and robotics.

Syntax of First-Order Logic

The syntax of FOL defines the symbols and rules used to create valid logical expressions.

1. Constant Symbols:
Represent specific objects.
Examples: John, Richard, Crown.

2. Predicate Symbols:
Represent properties or relationships.
Examples:
King(John)
Brother(Richard, John)

3. Function Symbols:
Represent mappings between objects.
Example:
LeftLeg(John)

4. Terms:
Terms refer to objects in the domain.
Examples:
John
LeftLeg(John)

5. Atomic Sentences:
Simple factual statements.
Examples:
King(John)
Brother(Richard, John)

6. Complex Sentences:
Built using logical connectives.
Example:
King(Richard) ∨ King(John)

Quantifiers in FOL
Quantifiers help express statements about groups of objects.

1. Universal Quantifier (∀):


Means “For all” or “Every.”
Example:
∀x (King(x) ⇒ Person(x))
Meaning: Every king is a person.

2. Existential Quantifier (∃):


Means “There exists.”
Example:
∃x (Crown(x) ∧ OnHead(x, John))
Meaning: There exists a crown on John’s head.

Importance of Quantifiers:
• Help express general rules.
• Reduce repetition.
• Improve logical reasoning in AI systems.

Wumpus World

The Wumpus World is a famous AI environment used to demonstrate logical reasoning and intelligent
decision-making.

Environment:
• 4×4 grid world.
• Contains Wumpus monster, pits, gold, and empty rooms.

Agent Goal:
Find the gold and return safely without falling into pits or being eaten by the Wumpus.

Percepts:
• Stench: Wumpus nearby.
• Breeze: Pit nearby.
• Glitter: Gold present.
• Bump: Hit a wall.
• Scream: Wumpus killed.

The Wumpus World helps students understand how AI agents use knowledge representation and logical reasoning
under uncertainty.

You might also like