0% found this document useful (0 votes)
10 views35 pages

Knowledge Representation in AI Agents

Uploaded by

epbaby89
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)
10 views35 pages

Knowledge Representation in AI Agents

Uploaded by

epbaby89
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

Foundations

Artificial Intelligence
Module 3 Knowledge Representation
Agents

Agent is Anything that perceives its environment through sensors and acts upon it
using actuators.

Types of Agents
1. Simple Reflex Agent – Acts on condition-action rules.
2. Model-Based Agent – Uses internal state to track world.
3. Goal-Based Agent – Chooses actions to achieve goals.
4. Utility-Based Agent – Maximizes performance measure.
5. Learning Agent – Improves performance with experience.

Problem-Solving Agent
• An agent that searches for solutions to reach a goal.
• Works in well-defined problems (start → actions → goal).
• Example: Solving a maze or 8-puzzle.

Limitations of Problem-Solving Agent


1. Hidden knowledge – The rules are inside the program, so the agent cannot
explain them.

Example: A reflex agent may follow a rule like “If there is an obstacle → turn
left.”It will turn left when an obstacle appears, but it cannot explain why it did
so. It only acts, without giving reasons.

2. No reasoning – It cannot think of new facts from what it already knows.


3. Partial info problem – If some information is missing, it just guesses.
o Example: In a maze, if one path is hidden, it tries all possible paths
blindly.

4. Not flexible – It cannot easily adapt to new changes.


o Example: A basic GPS says “go straight,” but if the road is blocked by
traffic, it gets stuck and cannot find a new route.
In this chapter, we use logic to represent knowledge for knowledge-based agents.
These agents can combine and reuse information for many purposes, not just
immediate actions. For example, like a mathematician proving a theorem or an
astronomer calculating Earth’s lifespan, they can handle abstract reasoning.
knowledge-based agents are very flexible ,they can take new tasks as clear goals,
learn quickly when given new knowledge, and adapt to changes in the environment
by updating what they know.

knowledge-based agent

A knowledge-based agent is an intelligent agent that uses a knowledge base That


represented in some formal language (logic, frames, semantic nets, rules, etc.),
which the agent can use for reasoning (inference) to decide actions and solve
problems.

knowledge base (KB)

The central component of a knowledge-based agent is its knowledge base (KB). A


knowledge base is a set of sentences, Each sentence is written in a knowledge
representation language and represents some assertion about the world.
A sentence can be called an axiom when we accept it as true without deriving it from
other sentences.

TELL and ASK

There must be a way to add new sentences to the knowledge base (KB) and a way
to query what is known. The standard names for these operations are TELL (to add
information) and ASK (to query). Both operations may involve inference, which
means deriving new sentences from old. The agent’s answers must come only from
what it already knows, it should not guess.
Explanation

TELL (KB, MAKE-PERCEPT-SENTENCE (percept, t))


convert the raw percept into a KB sentence and add it. MAKE-PERCEPT-
SENTENCE turns sensor readings into a formal sentence

action = ASK (KB, MAKE-ACTION-QUERY ())


Ask the KB what to do now; the KB (using inference) decides the best action.
MAKE-ACTION-QUERY: Creates a question asking the KB which action to take.

TELL (KB, MAKE-ACTION-SENTENCE (action, t))


Record into the KB that this action was taken, then execute the action. MAKE-
ACTION-SENTENCE: Records the action the agent has carried out.

Declarative approach and Procedural approach

A knowledge-based agent can be built simply by TELLing it what it needs to know.


Starting with an empty knowledge base, the agent designer can TELL sentences one
by one the agent knows how to operate in its environment. This is called the
declarative approach to system building. In contrast, the procedural approach
encodes desired behaviors directly as program code. A successful agent often
combines both declarative and procedural elements in its design.

Benefits of Knowledge-Based Agents

• Knowledge-based agents can understand the context and make decisions


suited to the situation.
Example: An e-commerce AI adjusts product prices during festive seasons
based on demand and competition.
• They can explain their decisions because they rely on clear rules and facts.
Example: A medical diagnosis system explains why it suggests a particular
treatment
• They do not need massive amounts of data, as they work with stored
knowledge.
• They can handle new situations by applying logical reasoning to the
knowledge base.
• Updating or adding new knowledge is easy, which improves their
performance over time.
• They provide accurate and reliable results in specialized fields like medicine,
law, and finance.

Wumpus World

• Wumpus World is a classic AI problem that teaches how agents can use
knowledge, logic, and inference to make safe decisions in a dangerous,
partially unknown environment.
• Wumpus World is a grid-based cave environment used in AI to test
knowledge-based agents.

• The world contains:


o A dangerous creature called the Wumpus (kills if the agent enters its
room).
o Pits (bottomless holes that trap the agent).
o Gold (treasure that the agent must find).

• The agent starts at position [1,1] and tries to find the gold and escape safely.
• The world is partially observable, meaning the agent does not see everything
directly but must infer from clues.
• At the start [1,1], there is no danger → so the nearby squares [1,2] and [2,1]
are safe.
• The agent moves to [2,1] and feels a Breeze → so a pit is nearby (either at
[2,2] or [3,1]).
• The agent goes back and tries [1,2], feels a Stench → the Wumpus must be at
[1,3].
• Since there is no Breeze at [1,2], [2,2] must be safe → therefore the pit is at
[3,1].
• With this logic, the agent keeps moving safely until it finds Glitter (gold).
• It uses Grab to pick up the gold, then returns to [1,1] and uses Climb to escape.
In each case for which the agent draws a conclusion from the available information,
that conclusion is guaranteed to be correct if the available information is correct This
is a fundamental property of logical reasoning

PEAS Description of Wumpus World

1. Performance Measure
• +1000 → For climbing out of the cave with the gold.
• –1000 → For falling into a pit or being eaten by the Wumpus.
• –1 → For each action taken (to avoid unnecessary moves).
• –10 → For using the arrow.
• Game ends → When the agent dies or successfully climbs out.

2. Environment
• A grid of rooms (commonly 4×4 or 9×4).
• Agent always starts at [1,1], facing right.
• Locations of gold and Wumpus are chosen randomly (not in [1,1]).
• Each non-start square may contain a pit with probability 0.2.

3. Actuators (Agent’s Actions)


• MoveForward → Move one step ahead.
• TurnLeft / TurnRight → Rotate 90°.
• Grab → Pick up gold (if in the same square).
• Shoot → Fire an arrow straight ahead:
o Kills Wumpus if hit.
o Stops if it hits a wall.
o Only one arrow → only the first Shoot matters.
• Climb → Exit the cave (only from [1,1]).

4. Sensors (Percepts)
• Stench → Wumpus is in the same or adjacent square.
• Breeze → Pit is in an adjacent square.
• Glitter → Gold is in the current square.
• Bump → Agent walked into a wall.
• Scream → Wumpus has been killed (heard anywhere).

Logic

A logical agent is a type of knowledge-based agent that makes decisions by using


logic. It maintains a set of facts about the world in its knowledge base and applies
reasoning rules to determine the best course of action.

There are mainly two types of logic used for reasoning.


1. Propositional logic
2. First-order logic

Propositional logic deals with simple statements that are either true or false, and it
helps in representing basic facts and rules. First-order logic (FOL) is more powerful,
allowing representation of objects, their properties, and relationships using
quantifiers like “for all” (∀) and “there exists” (∃). While propositional logic is
simple and easy to use, FOL can express complex knowledge and enable AI systems
to make more detailed inferences. These types of logic form the foundation for
logical agents to reason, solve problems, and make intelligent decisions.

Propositional logic

Propositional logic is used for solving complex problems using simple statements.
These statements can either be true or false but cannot be both at same time. These
propositions form knowledge representation, reasoning and decision-making in AI
systems.

Propositional logic works with statements called propositions, which can be either
true or false. These statements represent facts or conditions about a situation. We
use symbols for the propositions and logical operators to connect them. This helps
us understand how different facts are related.
Syntax of Propositional Logic
The syntax tells us how to form valid sentences in propositional logic.

(a) Atomic Statements

• A proposition is a statement that can either be true or false. It does not


matter how complicated statement is if it can be classified as true or false
then it is a proposition.
• Examples:
o P = “It is raining.”
o Q = “The ground is wet.”
o R = “I have an umbrella.”

(b) Complex Sentences


• Built from atomic sentences using logical connectives:

1. Negation (¬P) → Not P

• P: "It is raining."
• ¬P: "It is not raining."

[Link] (P ∧ Q) → P AND Q

o True only if both P and Q are true.

• P: "I have a pen."


• Q: "I have a book."
• P ∧ Q: "I have a pen and a book."

3. Disjunction (P ∨ Q) → P OR Q
o True if at least one of P or Q is true.

• P: "I will drink tea."


• Q: "I will drink coffee."
• P ∨ Q: "I will drink tea or coffee (or both)."

4. Implication (P → Q) → If P then Q
o False only if P is true and Q is false.

• P: "It rains."
• Q: "The ground gets wet."
• P → Q: "If it rains, then the ground gets wet."

5. Biconditional (P ↔ Q) → P if and only if Q


o True if P and Q have the same truth value.

• P: "You can enter the room."


• Q: "You have the key."
• P ↔ Q: "You can enter the room if and only if you have the key."

Logical Connectives
We use symbols to combine propositions into more complex statements.

Symbol Name Meaning


¬ NOT Negation, opposite of truth
∧ AND True only if both statements are true
∨ OR True if at least one statement is true
→ IMPLIES “If…then…”
↔ BICONDITIONAL “If and only if”
Truth Tables
They are used to find the truth value of complex propositions by checking all
possible combinations of truth values for their components. They systematically list
every possible combinations which helps in making it easy to find how different
logical operators affect the overall outcome. This approach ensures that no
combination is given extra importance which provides a clear and complete picture
of the logic at work.

Example of Propositions Logic

• P: "The sky is blue." (This statement can be either true or false.)


• Q: "It is raining right now." (This can also be true or false.)
• R: "The ground is wet." (This is either true or false.)

These can be combined using logical operations to create more complex


statements. For example:

• P ∧ Q: "The sky is blue AND it is raining." (This is true only if both P and Q
are true.)
• P ∨ Q: "The sky is blue OR it is raining." (This is true if at least one of P or
Q is true.)
• ¬P: "It is NOT true that the sky is blue." (This is true if P is false means the
sky is not blue.)

Applications of Propositional Logic in AI

1. Knowledge Representation: Propositional logic is used to represent knowledge


in a structured way. It allows AI systems to store and manipulate facts about the
world. For example in expert systems knowledge is encoded as a set of
propositions and logical rules.
2. Automated Reasoning
3. Decision Making: It helps to evaluate various options and find the best course
of action. Logical rules can encode decision criteria and truth tables can be used to
assess the outcomes of different choices.
4. Natural Language Processing (NLP): It is applied in NLP for tasks like
semantic parsing where natural language sentences are converted into logical
representations. This helps in understanding and reasoning about the meaning of
sentences.

Limitations of Propositional Logic

Despite of having many advantages it has various limitations:

1. Lack of Expressiveness: It cannot handle relationships like "All humans are


mortal."
2. Scalability: Truth tables expands exponentially with the number of
propositions.
3. Limited Inference: It only handles binary truth values (true/false) and cannot
represent probabilities.
4. No Quantifiers: Unlike predicate logic it does not allow the use of
quantifiers such as “for all” (denoted by ∀) or “there exists” (denoted by ∃).
6. Inability to Handle Uncertainty: Cannot deal with uncertain or incomplete
information.
7. Lack of Context Awareness: Ignores the meaning or context of statements,
so it cannot understand deeper situations.
First-Order Logic

First-Order Logic, more popularly known as Predicate Logic, or First-Order


Predicate Logic for short, is an extension of Propositional Logic. Unlike
propositional logic which only tells that a statement is either true or false, First-Order
Logic allows us to define relationship between objects, general rules, and quantified
statements.

Key components of First-Order Logic


The fundamental components of First-Order Logic (FOL), which helps in the
systematic representation of relationships, objects, and logical propositions, are as
follows −
• Constants are different objects or constant values that exist inside given
domain. For example − Krish, Bob, 5, Apple.

• Variables are symbols that can take several values inside a particular domain.
Commonly used symbols for variables are x,y,z. If the domain consists of
students, then x could represent any student in the class.

• Predicates are statements that describe properties of objects or their


relationships. They accept at least one parameter, which may be a constant or
a variable. For example − Father(John, Robert). Here father is predicate which
tells the relation between John and Robert.

• Functions map elements to distinct values. They take arguments in the form
of input elements and return a single value as output. For example −
Age(Alice) = 25 → means "Alice's age is 25."

• Quantifiers tell whether a sentence is true for all objects in the domain or just
one. For example − xLikes(x,Math) → "All students like Mathematics." and
xLikes(x,Math) → "There exists at least one student who likes Mathematics."
• Logical connectives enable to logically combine numerous statements or
propositions. They allow complicated statements to be constructed from
simpler ones. For example −
CompletesTraining(x)→EligibleForPromotion(x). If an employee x
completes the required training, then they automatically become eligible for a
promotion.

Logical Components in Formal Logic

Components Examples
Constants 1, 5, Apple, Bob, India
Variables x, y, z, a, b
Predicates Father, Teacher, Brother
Functions sqrt, LeftLegOf, AgeOf, add(x, y)
Quantifiers ∀ (for all), ∃ (there exists)
Connectives ∧ (and), ∨ (or), ¬ (not), → (implies), ↔ (if and only if)

Syntax and Semantics of First-Order Logic (FOL)

The syntax of FOL describes the form of valid assertions by employing constants,
variables, predicates, functions, quantifiers, and logical connectives. Statements are
composed of words (which represent objects) and atomic formulae (which convey
facts).
The semantics of first-order logic (FOL) define the meaning of assertions by
interpreting predicates and words throughout a domain. An interpretation gives
real-world meaning to objects and relationships.
Example
The following example demonstrates how syntax and semantics are applied in
First-Order Logic (FOL) to represent a real-world statement −
• Consider a statement "Every customer who makes a purchase receives an
invoice".
• The FOL representation of the statement using syntax and semantics is as
follows x(Customer(x)Purchases(x,Product)→ReceivesInvoice(x))
• Thus, syntax defines the structure, and semantics give it meaning.

Quantifiers in First-Order Logic

Quantifiers in First Order Logic in AI, as the name suggests, are used to quantify
any entity in a given environment. Quantification refers to the identification of the
total number of an entity that is present in the environment and satisfies a given
expression in First Order Logic in Artificial Intelligence. Quantifiers enable us to
determine the range and scope of a variable in a logical expression. Two types of
quantifiers are stated as follows.
1. Universal Quantifier
2. Existential Quantifier

Universal Quantifier

Universal Quantifier in First Order Logic in AI is a symbol in a logical expression


that signifies that the given expression is true in its range for all instances of the
concerned entity. It is represented by the symbol ∀(an inverted A). If x is a variable,
then ∀x is read as "For all x" or "For every x" or "For each x".

For example, let us take the sentence, "All cats like fish". Let us take a
variable x which can take the value of "cat". Let us take a predicate cat (x) which is
true if x is a cat. Similarly, let us take another predicate likes (x,y) which is true if x
likes y. Therefore, using the universal quantifier ∀, we can write
∀x cat (x)⟹ likes (x, fish ).
This expression is read as "For all x, if x is a cat, then x likes to fish".
Existential Quantifier

An existential Quantifier in First Order Logic in Artificial Intelligence is a symbol


in a logical expression that signifies that the given expression is true in its range for
at least one of the instances of the concerned entity. It is represented by the
symbol ∃ (an inverted E). If xx is a variable, then ∃x is read as "There exists
x" or "For some x" or "For at least one x".

For example, let us take the sentence, "Some students like ice cream". Let us take a
variable x which can take the value of "student". Let us take a
predicate student (x) , which is true if x is a student. Similarly, let us take another
predicate likes (x,y) , which is true if x likes y . Therefore, using the existential
quantifier ∃, we can write
∃x student (x)∧ likes (x, ice-cream )
This expression reads, "There exists some x such that x is a student and also likes
ice cream".

Sentences in First-Order Logic

In First-Order Logic (FOL), sentences are used to represent facts and relationships.
These sentences can be classified into atomic sentences and complex sentences.

Atomic Sentences
An atomic sentence is the most basic form of a statement in First-Order Logic. It
consists of a predicate and arguments, which can be either constants or variables.
An atomic statement asserts a fact about things without using logical connectives.
Structure of Atomic Sentences: Predicate(Argument 1,Argument 2,...,Argument n)
where −
• The predicate represents a property or relationship.
• The arguments represent objects (constants or variables).
Example
The following example demonstrate the use of atomic sentences in First-Order
Logic to represent facts and relationships −
• Teacher(John, Mathematics) This atomic sentence states that John is a
teacher of Mathematics.

Complex sentence
Two or more atomic statements connected by logical connectives like AND, OR,
NOT (¬), Implies (→), and Bi-conditional create a complex sentence. These
sentences allow us to express more complex logical statements.
Example
The following examples demonstrate the use of complex sentences in First-Order
Logic to represent facts and relationships −
• (y Teacher(y) Teaches(y, Math)) "There exists at least one teacher who
teaches Mathematics."
• (x Customer(x) → Buys(x, TutorialsPointCourses)) "For all customers, if x
is a customer, then x buys courses from Tutorials Point."
• (y Employee(y) WorksFor(y, TutorialsPoint)) "There exists at least one
employee who works for Tutorials Point."

Applications of First-Order Logic in AI

1. Knowledge Representation: FOL is used to encode relationships and


properties about the world. For example, in a medical diagnosis system,
predicates could define symptoms and diseases, helping the AI system
reason about possible conditions.
2. Automated Theorem Proving: It is used to prove mathematical theorems
or verify software correctness by applying logical rules.
3. Natural Language Processing (NLP): It is used to understand and structure
language. Tasks like machine translation or question answering benefit from
turning natural language into logical statements.
4. Expert Systems: In expert systems, it encodes knowledge to infer decisions.
For example, a legal expert system might use it to reason through laws and
regulations.
5. Semantic Web: It helps in defining relationships between web resources,
improving search accuracy and intelligent information retrieval.

Challenges of First-Order Logic

• Computational Complexity: Reasoning with large knowledge bases can be


resource-intensive, making it difficult to scale.
• Expressiveness vs. Decidability: While FOL is highly expressive, it is
undecidable means there are statements that cannot be resolved
algorithmically.
• Handling Uncertainty: It doesn't handle uncertainty well. To manage real-
world ambiguity, extensions like fuzzy logic or probabilistic logic are used.

Ontological engineering

Ontological engineering in Artificial Intelligence (AI) is the process of creating


formal, structured frameworks called ontologies to represent knowledge about a
specific domain.
These ontologies define concepts, their attributes, and the relationships between
them, allowing AI systems to formally understand, manage, and reason about
complex information. This structured knowledge representation enables better data
integration, semantic interoperability, and more sophisticated reasoning capabilities
in AI applications like Natural Language Processing (NLP) and the semantic web.
Key Components of Ontologies

1. Individuals

Individuals represent the most basic and specific objects or entities in an ontology.
These are the instances of concepts defined within the ontology.
• Definition: Individuals are real-world objects, events, or entities.
• Example:
• In a healthcare ontology, an individual could be a specific patient
named “John Doe.”
• In an e-commerce ontology, an individual could be a product like
“iPhone 15.”
Use Case: Individuals help AI systems model specific data instances, such as
identifying a particular symptom, product, or user.

2. Classes

Classes are groups or sets of individuals that share common characteristics. They
represent concepts or categories in an ontology and help organize individuals
meaningfully.
• Definition: Classes define the categories to which individuals belong.
• Example:
• In a medical ontology:
• Class: Disease
• Individuals: “Diabetes,” “Hypertension.”
• In an e-commerce ontology:
• Class: Electronics
• Individuals: “Laptop,” “Smartphone.”
a) Primitive Classes
• Definition: These are the basic categories defined directly without depending
on other classes.
• They are fundamental building blocks in an ontology.
• They do not require rules or conditions from other classes to exist.
Examples:
• In a Medical Ontology:
o Disease, Patient, Doctor
o “Diabetes” belongs to the Disease class.
• In an E-commerce Ontology:
o Electronics, Clothing, Furniture
o “Laptop” belongs to the Electronics class.

b) Derived Classes
• Definition: These classes are formed based on conditions, restrictions, or
combinations of other classes.
• They depend on primitive classes and are often defined using logical rules.
Examples:
• In a Medical Ontology:
o Chronic Disease (Derived from Disease with the condition “long-
lasting”)
o “Diabetes” and “Hypertension” belong here.
• In an E-commerce Ontology:
o Discounted Electronics (Derived from Electronics + condition
“hasDiscount = true”)
o “Smartphone on sale” belongs here.
Relations

Relations express the interactions or associations between concepts in an ontology.


They help organize knowledge by showing how concepts are connected.
a) Hierarchical Relations
• Describe generalization or specialization between concepts.
• Form a hierarchy of concepts.
• Allow inheritance of properties.
• Example: Car is a Vehicle (generalization), Engine is a part of Car (part-of
relation).

b)Associative Relations

• Capture functional or conceptual connections without hierarchy.


• Represent real-world interactions, dependencies, or use-case-specific links.
• Example: Driver operates Vehicle, Bus runs on Road.

Axioms (Rules and Constraints)

Definition:
Axioms are logical statements that define rules, constraints, or truths within an
ontology. They ensure consistency and enable reasoning/inferencing.
Characteristics:
• Define domain rules.
• Prevent contradictions.
• Support reasoning engines.
Examples:
• All vehicles must have at least one engine.
• A person cannot be both a passenger and a driver of the same vehicle at the
same time.
Types of Axioms in Transportation Ontology:
1. Cardinality Axiom: Specifies number-based constraints.
o Example: A vehicle must have exactly four wheels.
2. Disjointness Axiom: Ensures concepts are mutually exclusive.
o Example: A person cannot be both a Driver and a Passenger for the
same trip.
3. Existence Axiom: Specifies that certain entities must exist or be linked.
o Example: Every bus must be assigned to at least one route.

Types of Ontologies

Ontology, as a structured representation of knowledge, plays a pivotal role in


semantic systems and intelligent applications. For better understanding and
practical implementation, ontologies are typically classified based on two key
criteria:
1. The formality of their representation language
2. Their hierarchical scope or level of abstraction
These classifications assist in choosing the right type of ontology for specific
applications, ranging from foundational frameworks to domain-specific solutions.

Classification based on representation language

1. Informal Ontologies
Informal ontologies are the simplest type of ontology. They use natural language or
simple lists, glossaries, and taxonomies. They are easy for humans to read and
understand. For example, a list of animals grouped as mammals, birds, and reptiles,
or a glossary of terms, is an informal ontology. The limitation is that computers
cannot use them for reasoning, because they do not follow strict rules. They are
mainly used for organizing knowledge and explaining concepts to humans.

[Link] Ontologies
Formal ontologies are designed to be understood and processed by computers. They
use logic-based languages such as OWL (Web Ontology Language) or Description
Logics to represent knowledge in a structured and precise way. This structure allows
computers to automatically check for errors, discover new facts, and make logical
conclusions. Formal ontologies are more reliable than informal ontologies because
they follow strict rules and can be used in intelligent systems, AI applications, and
the semantic web.
a)Decidable ontologies

Decidable ontologies are simple and follow clear rules, so computers can easily
reason with them, check for mistakes, and infer new knowledge. An example is
OWL DL, which is widely used in AI and the semantic web. Decidable ontologies
are like clear instructions a computer can always follow without confusion.

b)Undecidable ontologies

Undecidable ontologies are more expressive and can represent complex


relationships, but their complexity can make it hard for computers to reason
automatically. OWL Full is an example of an undecidable ontology. They are like
very complicated instructions or a maze that computers may find difficult to
navigate.
Classification Based on Ontological Scope

Ontologies can also be categorized based on how broad or specific their knowledge
is, i.e., their scope or level of generality. This classification helps decide which
ontology to use depending on the application or domain. The main types are:
1. Upper Ontologies (Top-Level Ontologies)

• These provide very general concepts that are not tied to any specific domain.
• They describe basic categories such as time, space, objects, events, causality,
or relationships.
• They are useful because these general concepts can be reused across many
domains, ensuring consistency in knowledge representation.
• Simple explanation: Think of upper ontologies as the “skeleton” of
knowledge that can support any type of domain-specific information.

2. Reference Ontologies
• These provide standardized vocabularies and conceptual frameworks for
specific communities or fields.
• They ensure that knowledge is represented consistently and understood the
same way by everyone in that community.
• Example: Gene Ontology (GO) standardizes terms for biological processes,
molecular functions, and gene products in life sciences.
• Simple explanation: Reference ontologies are like an official dictionary or
handbook that everyone in a field agrees to use.

3. Domain Ontologies
• These focus on knowledge specific to a particular field or area of interest.
• They describe concepts, relationships, and rules relevant to that domain.
• Example: An ontology for the automobile industry might include concepts
like engines, vehicles, car models, and manufacturers.
• Simple explanation: Domain ontologies are like specialized guides for a
particular field, providing detailed knowledge for experts or systems.

4. Application Ontologies
• These are designed to support specific applications or tasks.
• They usually extend or refine domain ontologies to suit a particular system
or problem.
• Example: A medical diagnosis application might use an application ontology
that combines medical knowledge with rules to help reason about patient
cases.
• Simple explanation: Application ontologies are like customized toolkits that
adapt general or domain knowledge for a specific use case.

Applications of ontology engineering

Ontology engineering involves the creation, maintenance, and deployment of


ontologies, which are formal representations of knowledge. These ontologies can be
used in various applications, including:
• Information retrieval: Ontologies can be used to improve the accuracy of
search results by helping to understand the meaning of terms and relationships
between them.
• Knowledge management: Ontologies can help organize and manage
knowledge in a more structured and systematic way. They can also facilitate
the sharing and reuse of knowledge across different systems and applications.
• Semantic web: Ontologies are a key component of the Semantic Web, which
aims to make web content machine-readable and understandable by
computers.
• Natural language processing: Ontologies can be used to improve natural
language processing by providing a framework for understanding the meaning
of words and sentences.
• Robotics: Ontologies can be used to enable robots to better understand their
environment and perform tasks more efficiently and accurately.
• Healthcare: Ontologies can be used to improve healthcare by providing a
standardized way to represent medical knowledge and improve the
interoperability of healthcare systems.
• E-commerce: Ontologies can be used to improve product search and
recommendation systems by providing a more structured and accurate
representation of products and their attributes.
challenges in ontology engineering

1. Complexity:

Creating an ontology requires capturing knowledge about a domain in a structured,


formal way. As the domain becomes larger or more detailed, the ontology becomes
increasingly complex, making it difficult to design, maintain, and update.
Example: A healthcare ontology covering all diseases, treatments, drugs, and
symptoms can become extremely complex to manage.

2. Ambiguity:

Natural language and human knowledge often have ambiguous meanings.


Translating this knowledge into a formal ontology can be challenging because the
same term can have different interpretations depending on context.
Example: The word “bank” could mean a financial institution or the side of a river.
The ontology must clearly define which meaning applies.

3. Scalability:

As ontologies grow in size, ensuring that they can handle large amounts of data
efficiently becomes difficult. Performance issues may arise when reasoning over or
querying very large ontologies.
Example: An e-commerce ontology for millions of products must remain fast for
search and recommendation queries.

4. Consistency:

Ontologies must avoid contradictions and maintain logical consistency. Adding new
concepts or relationships can inadvertently create conflicts with existing ones.
Example: If an ontology defines “All birds can fly” but later adds “Penguins are
birds,” consistency rules must handle exceptions.
Ontological Categories and objects
Physical Composition

Physical composition describes how an object is made up of smaller parts and their
arrangement, capturing “part–whole” relationships.
Example (Bicycle): A bicycle consists of a frame, wheels, pedals, chain, and seat.
Each part can be further broken down (e.g., a wheel has a rim, spokes, and tire).
Representing this in ontology helps in tasks like repair, assembly, or inventory
management.

Measurements and properties

In ontology, measurements and properties are used to describe the characteristics of


something. For example, a car can have a weight, color, and speed; water can have
a temperature or volume. These details help us identify, compare, and reason about
different entities.
By using standardized properties (like meters for length, kilograms for weight),
knowledge can be shared easily across different systems, making AI and other
applications more accurate and consistent.

Things and Stuff

Things: These are discrete, identifiable objects that exist independently and can be
counted. They have a distinct identity, meaning each “thing” can be distinguished
from another. Things are often what we interact with in daily life. In ontology,
representing things allows systems to reason about individual entities, their
properties, and relationships.

Example: A bicycle is a thing because it is a complete, countable object. Similarly,


a book or a person is a thing because each can be individually identified and
referenced.
Stuff: Stuff refers to substances or materials that do not have a distinct individual
identity and are generally uncountable. They are the matter from which things are
made. Modeling stuff in ontology is important for understanding composition,
material properties, and processes involving substances.

Example: Water, air, wood, and metal are considered stuff. A bicycle, for instance,
is made of metal, rubber, and plastic , the metal and rubber are the “stuff” that
composes the bicycle.

Importance: Including both things and stuff in an ontology allows for a complete
representation of the physical world. Things represent objects, while stuff represents
their material composition. This distinction is crucial in applications like robotics,
manufacturing, healthcare, or e-commerce, where understanding both the entity and
the materials it consists of improves reasoning, decision-making, and knowledge
sharing.

Processes and Events

Processes: Ongoing changes or activities (e.g., water boiling, learning, driving)

Events: One-time occurrences that happen at a specific moment (e.g., a light


turning on)

Al must represent and track these changes to act intelligently.


Example:A smart assistant should know that "charging a phone" is a process that
ends when the battery is full.
Understanding processes and events helps Al in planning, prediction, and real-time
decision-making.

Time Intervals and Duration

Time Interval: A period with a start and end (e.g., 2:00 PM to 3:00 PM)
Duration: The length of time something lasts (e.g., the meeting lasted 30 minutes)

Why does time matter in Al --- Scheduling systems, like calendar apps or delivery
systems, must manage time intervals and durations.

Fluents

Fluents in ontology are properties or conditions of entities that can change over
time. Unlike static properties (like a bicycle’s color or weight), fluents represent
dynamic aspects that may vary depending on circumstances or moments.
Why they are important:
1. Capture change: Many real-world scenarios involve states that evolve.
Fluents allow ontologies to represent these changes accurately.
2. Support reasoning: By modeling fluents, intelligent systems can predict
outcomes, detect state changes, or make decisions based on current
conditions.
3. Temporal understanding: Fluents are crucial for representing time-dependent
knowledge, such as a person’s location, a machine’s status, or a room’s
temperature.
Examples:
• A traffic light’s state (red, yellow, green)
• A patient’s health condition (stable, critical)
• A door’s status (open, closed)

fluents make ontologies dynamic, enabling systems to understand and reason about
changes over time, which is essential for applications like robotics, healthcare, and
event monitoring.

Acting Under Uncertainty


Agents often have to act without knowing everything for certain. This uncertainty
can come from partial observability (not seeing the whole environment),
nondeterminism (actions may have unpredictable outcomes), or both.
A logical agent can try to handle uncertainty by keeping a belief state, which
represents all possible situations it could be in, and by creating contingency plans
to handle different scenarios. But this approach has problems:
1. Considering all possible explanations for observations can make the belief
state extremely large and complex.
2. A contingency plan covering every possible event can become
unmanageably big.
3. Sometimes, there is no guaranteed plan, yet the agent must still act.
Example: An automated taxi aims to get a passenger to the airport on time. Even if
the plan seems reasonable (leave 90 minutes early), many things could go wrong—
car breakdown, accidents, early flight departure, etc. The agent cannot guarantee
success because it cannot foresee every possibility.

Sources of Uncertainty

In AI and agent systems, uncertainty arises from several factors in the environment
or the agent’s knowledge. The main sources are:
1. Partial Observability: The agent cannot see the entire state of the
environment.
Example: A robot navigating a room with obstacles it cannot fully detect.
2. Nondeterminism: Actions may have unpredictable outcomes.
Example: A robot trying to pick up a fragile object might sometimes drop it.
3. Incomplete Knowledge: The agent lacks full information about the world.
Example: A doctor diagnosing a patient without knowing all symptoms.
4. Ambiguity: The same observation can have multiple possible explanations.
Example: Seeing wet streets could mean it rained, or someone watered the
garden.
5. Dynamic Environment: The world can change independently of the agent’s
actions.
Example: Traffic conditions changing while a self-driving car is moving.
6. Sensor Noise: Sensors may give inaccurate or noisy readings.
Example: A robot’s camera may misread the position of an object due to
poor lighting.

Representing Uncertainty
In AI and ontology, uncertainty is represented so that agents can reason and make
decisions even when they don’t have complete or certain knowledge. Common
ways to represent uncertainty include:

[Link]

Probability is a mathematical way to represent how likely an event or state is to


occur. Instead of assuming that something is either true or false, probability allows
an agent to express uncertainty in terms of likelihood. This helps agents make
informed decisions even when they cannot be certain about the outcome.
• Definition: Probability is a number between 0 and 1 (or 0% and 100%) that
indicates the chance of an event happening.
o 0 means the event will definitely not happen.
o 1 means the event will definitely happen.
o Values in between indicate varying degrees of likelihood.
Example: Suppose the weather forecast says there is a 70% chance of rain
tomorrow. This does not guarantee that it will rain, but it tells the agent that rain is
more likely than not. A rational agent (like a robot or AI system) can use this
probability to decide actions, such as:
• Carrying an umbrella
• Rescheduling an outdoor event
• Adjusting a delivery route
Why it’s useful in AI:
1. Decision-making under uncertainty: Agents can weigh the benefits and risks
of actions based on likelihoods.
2. Updating beliefs: Probabilities can be updated as new information arrives
(using techniques like Bayesian updating).
3. Comparing alternatives: Agents can choose the action with the highest
expected benefit given uncertain outcomes.

[Link] Logic

Fuzzy logic is a way to represent uncertain or imprecise information where things


are not just true or false, but can have degrees of truth between 0 and 1. Unlike
classical logic, which is strict (something is either true or false), fuzzy logic allows
reasoning in situations that are vague or ambiguous.
Key Points:
1. Degrees of truth: Instead of 0 or 1, a statement can be partly true.
Example: “The room is hot” can be 0.7 true (somewhat hot) rather than fully
true or false.
2. Handling imprecision: Useful when measurements or perceptions are not
exact.
Example: Temperature, speed, or distance often cannot be described
precisely.
3. Rules-based reasoning: Fuzzy logic uses rules like “IF temperature is high
THEN turn on fan moderately,” allowing smooth decision-making.
Example in AI:
• A smart thermostat decides how much to cool a room based on fuzzy values
like “slightly warm,” “warm,” or “very hot” rather than just ON/OFF.
• A self-driving car adjusts speed gradually when the road is “somewhat
slippery” rather than just labeling it as slippery or safe.
Why it’s important:
Fuzzy logic allows systems to handle real-world uncertainty, work with vague
concepts, and make decisions similar to human reasoning.
[Link] Networks (Bayesian Networks)
A belief network, also called a Bayesian network, is a graphical model used to
represent uncertain knowledge and the dependencies between variables. It
combines probability theory and graph theory to help agents reason under
uncertainty.
Key Points:
1. Nodes represent variables: Each node is a random variable, such as “Rain”
or “Traffic Jam.”
2. Edges represent dependencies: Arrows show how one variable affects
another.
Example: Rain → Wet Streets (rain increases the chance of wet streets).
3. Probabilities are assigned: Each node has a probability table that shows the
likelihood of its states given its parent nodes.
4. Reasoning under uncertainty: Agents can compute the probability of an
event given known evidence.
Example:
• Variables: Rain, Sprinkler, Wet Grass
• The network models how rain or the sprinkler being on affects whether the
grass is wet.
• If the agent observes wet grass, it can infer the likelihood that it rained.
Why it’s important:
Belief networks allow agents to predict outcomes, update beliefs with new
information, and make rational decisions even when there is uncertainty in the
environment.

You might also like