W06- Knowledge Representation in AI
W06- Knowledge Representation in AI
REPRESENTATION IN AI
By: SEK SOCHEAT
Lecturer Artificial Intelligence
2023 – 2024
Mobile: 017 879 967 MSIT – AEU
Email: [email protected]
TABLE OF CONTENTS
Knowledge Representation in AI
1. Introduction
Importance of KR in AI:
• Critical for developing intelligent systems that can perform tasks such as
4
diagnosis, learning, and language understanding.
2. VISUALIZATION OF THE SEMANTIC NETWORK
2. VISUALIZATION OF THE SEMANTIC NETWORK
Types of Knowledge Representation
1. Semantic Networks:
• Semantic networks are a way to represent knowledge using a graph structure.
• Semantic networks help in representing complex relationships and hierarchies in a visual and intuitive
way.
• They are widely used in artificial intelligence for knowledge representation, natural language processing,
and more.
They consist of nodes and edges:
• Nodes (Concepts): These are the individual entities or concepts in the network. Each node represents
a specific item, idea, or concept.
• Edges (Relationships): These are the connections between nodes that define the relationships or
associations between the concepts. Edges can have labels to specify the type of relationship.
6
2. VISUALIZATION OF THE SEMANTIC NETWORK
Types of Knowledge Representation
2. Frames Explanation:
4. Ontologies
Example Data:
Example: Domain: University Course Management
• John Doe (Student) is enrolled in "Introduction to AI" (Course).
7. Instances: • Dr. Smith (Instructor) teaches "Introduction to AI" (Course).
• Course: Introduction to AI
hasName: "Introduction to AI" Summary:
hasCreditHours: 3 • Ontologies in AI are used to represent knowledge within a specific
domain in a structured manner. They consist of concepts (classes),
• Student: John Doe properties (attributes), and relationships between those concepts.
hasName: "John Doe" • A simple example in the university course management domain
hasID: "12345" includes classes like Course, Student, and Instructor, with
relationships such as students enrolling in courses and instructors
• Instructor: Dr. Smith teaching courses.
hasName: "Dr. Smith" • This structured approach facilitates data organization, retrieval, and
teachesCourse: "Introduction to AI" reasoning within AI systems.
13
3. APPLICATIONS OF KNOWLEDGE REPRESENTATION
3. APPLICATIONS OF KNOWLEDGE REPRESENTATION
Expert Systems
Robotics
1. Define the Semantic Network Structure: • Define “is a type of” relationships to connect the hierarchy.
• Create a class to represent the semantic • Define “has characteristic” relationships to add specific
network. attributes.
Explanation:
2. Creating the Network:
1. Class Definition: • Create an instance of the SemanticNetwork.
• SemanticNetwork class with an • Add nodes for Animal, Mammal, Bird, Dog,
initializer to create an empty network. Cat, Sparrow, and Penguin.
• add_node method to add nodes. • Define relationships such as “is a type of” and
“has characteristic”.
• add_relationship method to define
relationships between nodes. 3. Displaying the Network:
• display_network method to print the • The display_network method prints each node
network. and its relationships.
20
SOLUTION:
21
SOLUTION:
Output
22
Thank You!
If you have any questions, please reach me!