Professional Documents
Culture Documents
Introduction to AI
Unit 1
Topics
● History, Definition of AI
● Emulation of human cognitive process
● Semantic nets
● An abstract view of modeling
● Elementary knowledge
● Computational logic
● Analysis of compound statements using simple logic
connectives
● Predicate logic
● Simple exercises
1
10/1/2022
https://www.javatpoint.com/history-of-
artificial-intelligence
2
10/1/2022
Turing Test
Alan Turing, in a 1951 paper
entitled “Computing Machinery
and Intelligence”, proposed a test
called the “Turing Test” or “The
Imitation Game”
https://science.jrank.org/programming/Turing_Test.html
3
10/1/2022
4
10/1/2022
5
10/1/2022
https://www.researchgate.net/publication/316184347_Evaluating_Quality_of_C
hatbots_and_Intelligent_Conversational_Agents/figures?lo=1
Wabot 1 & 2
6
10/1/2022
The duration between years 1974 to 1980 was the first AI winter duration. AI
winter refers to the time period where computer scientist dealt with a severe
shortage of funding from government for AI researches.
A boom of AI (1980-1987)
● Year 1980: After AI winter duration, AI came back with "Expert System".
Expert systems were programmed that emulate the decision-making ability of
a human expert.
● In the Year 1980, the first national conference of the American Association of
Artificial Intelligence was held at Stanford University.
https://www.javatpoint.com/history-of-artificial-intelligence
7
10/1/2022
● The duration between the years 1987 to 1993 was the second AI Winter
duration.
● Again Investors and government stopped in funding for AI research as due to
high cost but not efficient result. The expert system such as XCON was very
cost effective.
● Year 1997: In the year 1997, IBM Deep Blue beats world chess champion,
Gary Kasparov, and became the first computer to beat a world chess
champion.
● Year 2002: for the first time, AI entered the home in the form of Roomba, a
vacuum cleaner.
● Year 2006: AI came in the Business world till the year 2006. Companies like
Facebook, Twitter, and Netflix also started using AI.
8
10/1/2022
https://www.sportshistoryweekly.com/stories/chess-deep-blue-
ibm-gary-kasparov-grandmaster-deep-thought,837
9
10/1/2022
https://yakbots.com/what-is-the-eugene-goostman-chatbot/
10
10/1/2022
11
10/1/2022
Homo sapiens -
wise or astute
human
12
10/1/2022
AI - Definition
● AI is a field of
study that seeks to
explain and
emulate intelligent
behaviour in terms
of a computational
process
● It is a cross
discipline of
Cognitive science,
Computer science,
Engineering and
Mathematics
13
10/1/2022
What is AI?
Neurons
Neurons (also called neurones or
nerve cells) are the fundamental
units of the brain and nervous
system, the cells responsible for
1. receiving sensory input from
the external world,
2. for sending motor commands
to our muscles, and
3. for transforming and relaying
the electrical signals at every
step in between.
An artificial neuron is a
mathematical function conceived
Source: https://en.wikipedia.org/wiki/Neuron
as a model of biological neurons
14
10/1/2022
Emulation
15
10/1/2022
1. What is knowledge?
2. How can it be represented?
3. How can it / should it be manipulated?
Why is AI difficult?
1. How closely should human intelligence paradigms be simulated?
2. Humans use iconic images of concepts, record visuals and can recall such
images from sentences.
3. Difference between data and knowledge.
4. Need of algorithms that describe reasoning
5. Difficulty in ‘quantifying’ human intelligence since humans use vague
knowledge forms, analogy, common sense or even ‘intuition’.
6. AI can use recursion and search techniques only
7. Use of heuristics (based on experience; a heuristic is a technique designed for
solving a problem more quickly when classic methods are too slow, or for
finding an approximate solution - when classic methods fail to find any exact
solution).
16
10/1/2022
https://www.youtube.com/watch?v=nRMLTHDAVqc
Semantic Networks
17
10/1/2022
Semantic Networks
A semantic network, or frame network is a knowledge base that represents semantic relations
between concepts in a network. This is often used as a form of knowledge representation. It is a
directed or undirected graph consisting of vertices, which represent concepts, and edges, which
represent semantic relations between concepts, mapping or connecting semantic fields.
A semantic network may be instantiated as, for example, a graph database or a concept map.
Typical standardized semantic networks are expressed as semantic triples.
Semantic networks are used in natural language processing applications such as semantic parsing
and word-sense disambiguation.
Semantic networks can also be used as a method to analyze large texts and identify the main
themes and topics (e.g., of social media posts), to reveal biases (e.g., in news coverage), or even
to map an entire research field.
https://en.wikipedia.org/wiki/Semantic_network
A semantic network
● a classic AI representation
Semantic Networks technique used for propositional
information
● a propositional net
A proposition is a statement that is either
true or false
● A semantic net is a labeled, directed
graph.
● The structure of a semantic net is
shown graphically in terms of nodes
and the arcs connecting them.
○ Nodes are sometimes referred
to as objects
○ Arcs as links or edges
○ The links are used to express
relationships
○ Nodes are to represent physical
objects, concepts, or situation
18
10/1/2022
Semantic Networks
Compulsory Reading”
http://www.jfsowa.com/pubs/semnet.htm
19
10/1/2022
1. Definitional Networks
● These networks emphasises
and deals with only the
subtype or is a relation
between a concept type and a
newly defined subtype.
● A producing network is
referred to as generalization
hierarchy.
● It supports the inheritance
rule for duplicating
attributes.
2. Assertion Networks
● Designed to assert propositions
is intended to state
recommendations.
● Mostly data in an assertion
network is genuine unless it is
marked with a modal
administrator.
● Some assertion systems are even
considered as the model of the
reasonable structures
underlying the characteristic
semantic natural languages.
20
10/1/2022
4. Executable Networks
Executable semantic networks contain mechanisms that can cause some change to the network
itself. The executable mechanisms distinguish them from networks that are static data
structures, which can only change through the action of programs external to the net itself.
Three kinds of mechanisms are commonly used with executable semantic networks:
1. Message passing networks can pass data from one node to another. For some networks, the
data may consist of a single bit, called a marker, token, or trigger; for others, it may be a
numeric weight or an arbitrarily large message.
2. Attached procedures are programs contained in or associated with a node that perform
some kind of action or computation on data at that node or some nearby node.
3. Graph transformations combine graphs, modify them, or break them into smaller graphs.
In typical theorem provers, such transformations are carried out by a program external to
the graphs. When they are triggered by the graphs themselves, they behave like chemical
reactions that combine molecules or break them apart.
21
10/1/2022
4. Executable Networks
The simplest networks with attached
procedures are dataflow graphs,
which contain passive nodes that
hold data and active nodes that take
data from input nodes and send
results to output nodes.
5. Learning Networks
A learning system, natural or artificial, responds to new information by modifying its internal
representations in a way that enables the system to respond more effectively to its environment.
Systems that use network representations can modify the networks in three ways:
1. Rote memory. The simplest form of learning is to convert the new information to a
network and add it without any further changes to the current network.
2. Changing weights. Some networks have numbers, called weights, associated with the nodes
and arcs. In an implicational network, for example, those weights might represent
probabilities. Each occurrence of some pattern would increase the estimated probability of
its recurrence.
3. Restructuring. The most complex form of learning makes fundamental changes to the
structure of the network itself. Since the number and kinds of structural changes are
unlimited, the study and classification of restructuring methods is the most difficult, but
potentially the most rewarding.
22
10/1/2022
5. Learning Networks
Commercially, rote memory is of enormous importance, since the world economy depends on
exact record keeping.
For such applications, information is sometimes stored in tables, as in relational databases. But the
Semantic Web and related methods are more flexible for information that is not as rigidly
structured as a table. However, any information represented in one can be converted to the other.
For better efficiency and usability, most database systems add indexes to speed up the search, and
they support query languages, such as SQL, which perform transformations to extract and
combine the information necessary to answer a request.
Since a learning system must be able to distinguish common features and exceptions among
similar examples, another feature is essential: the ability to measure similarity and to search the
database for networks that are similar, but not identical to any given example.
5. Learning Networks
Neural nets are a widely-used
technique for learning by
changing the weights assigned
to the nodes or arcs of a
network.
In his study of learning,
Thorndike (1932) developed a
stimulus-response theory,
which he called connectionism:
rewards strengthen the S-R
connections, and punishments
weaken them.
23
10/1/2022
6. Hybrid Networks
Most applications of the Semantic Web are hybrids that combine several
methods.
Semantic Networks
of blocks on a table
24
10/1/2022
25
10/1/2022
Semantic relationships
Semantic relationships are the associations that there exist between the
meanings of words (semantic relationships at word level), between the
meanings of phrases, or between the meanings of sentences (semantic
relationships at phrase or sentence level).
At word level, the study semantic relationships are:
1. synonymy,
2. antonymy,
3. homonymy,
4. polysemy and
5. metonymy.
Semantic relationships
Synonymy is the semantic relationship that exists between two (or more) words
that have the same (or nearly the same) meaning and belong to the same part of
speech, but are spelled differently.
Antonymy is the semantic relationship that exists between two (or more) words
that have opposite meanings.
Homonymy is the relationship that exits between two (or more) words which
belong to the same grammatical category, have the same spelling, may or may not
have the same pronunciation, but have different meanings and origins (i.e., they
are etymologically and semantically unrelated). E.g., to lie (= to rest, be, remain, be
situated in a certain position) and to lie (= not to tell the truth).
26
10/1/2022
Semantic relationships
Hyponymy or inclusion is the semantic relationship that exists between two (or
more) words in such a way that the meaning of one word includes (or contains)
the meaning of other words(s). The term whose meaning is included in the
meaning of the other term(s) is the general term. They are superordinate or
hypernym. The term whose meaning includes the meaning of the other term is the
specific term; linguists usually refer to it as a hyponym.
Superordinate: - vehicle
Hyponyms - bus - car - lorry - van (bus - car - lorry - van are co-hyponyms).
Semantic relationships
Polysemy is the semantic relationship that exists between a word and its multiple
conceptually and historically related meanings.
27
10/1/2022
Advantages
Disadvantages
28
10/1/2022
Conceptual Graphs
★ Their purpose is to express meaning in a form that is logically precise,
humanly readable, and computationally tractable.
★ A formalism for knowledge representation.
29
10/1/2022
Abstract Modeling
Characteristics:
1. Valid
2. Unambiguous
3. Unique
4. Consistent - in case of more than 1 element
Abstract Modeling
S1 (m) = r1
S2 (m) = r2
30
10/1/2022
Knowledge Representation
● Knowledge representation and reasoning (KR, KRR) is the part of Artificial
intelligence which concerned with AI agents thinking and how thinking
contributes to intelligent behavior of agents.
● It is responsible for representing information about the real world so that a
computer can understand and can utilize this knowledge to solve the complex
real world problems such as diagnosis a medical condition or communicating
with humans in natural language.
● It is also a way which describes how we can represent knowledge in artificial
intelligence. Knowledge representation is not just storing data into some
database, but it also enables an intelligent machine to learn from that
knowledge and experiences so that it can behave intelligently like a human.
KR - What is represented?
1. Object: All the facts about objects in our world domain. E.g., Guitars contains
strings, trumpets are brass instruments.
2. Events: Events are the actions which occur in our world.
3. Performance: It describe behavior which involves knowledge about how to do
things.
4. Meta-knowledge: It is knowledge about what we know.
5. Facts: Facts are the truths about the real world and what we represent.
6. Knowledge-Base: The central component of the knowledge-based agents is
the knowledge base. It is represented as KB. The Knowledgebase is a group
of the Sentences (Here, sentences are used as a technical term and not
identical with the English language).
31
10/1/2022
Knowledge - Types
Knowledge: Knowledge is
awareness or familiarity gained
by experiences of facts, data, and
situations.
Types of Knowledge
1. Declarative Knowledge:
32
10/1/2022
Types of Knowledge
3. Meta-knowledge:
● Knowledge about the other types of knowledge is called Meta-knowledge.
4. Heuristic knowledge:
● Heuristic knowledge is representing knowledge of some experts in a field or
subject.
● Heuristic knowledge is rules of thumb based on previous experiences,
awareness of approaches, and which are good to work but not guaranteed.
5. Structural knowledge:
33
10/1/2022
AI knowledge cycle:
An Artificial intelligence
system has the following
components for displaying
intelligent behavior:
● Perception
● Learning
● Knowledge
Representation and
Reasoning
● Planning
● Execution
34
10/1/2022
2. Inheritable knowledge
● In the inheritable knowledge approach, all data must be stored into a hierarchy
of classes.
● All classes should be arranged in a generalized form or a hierarchal manner.
● In this approach, we apply inheritance property.
● Elements inherit values from other members of a class.
● This approach contains inheritable knowledge which shows a relation between
instance and class, and it is called instance relation.
● Every individual frame can represent the collection of attributes and its value.
● In this approach, objects and values are represented in Boxed nodes. We use
Arrows which point from objects to their values.
35
10/1/2022
2. Inheritable knowledge
3. Inferential knowledge
● Inferential knowledge approach represents knowledge in the form of formal
logics.
● This approach can be used to derive more facts.
● It guaranteed correctness.
Example: Let's suppose there are two statements:
Marcus is a man
All men are mortal
Then it can represent as;
man(Marcus)
∀x = man (x) ----------> mortal (x)s
36
10/1/2022
4. Procedural knowledge:
37
10/1/2022
1. Logical Representation
2. Semantic Network Representation
3. Frame Representation
4. Production Rules
1. Logical Representation
38
10/1/2022
1. Logical Representation
Syntax:
● Syntaxes are the rules which decide how we can construct legal sentences in
the logic.
● It determines which symbol we can use in knowledge representation.
● How to write those symbols.
Semantics:
● Semantics are the rules by which we can interpret the sentence in the logic.
● Semantic also involves assigning a meaning to each sentence.
a. Propositional Logics
b. Predicate logic
Advantages of logical representation:
39
10/1/2022
40
10/1/2022
3. Frame Representation
A frame is a record like structure which consists of a collection of attributes and
its values to describe an entity in the world.
Frames are the AI data structure which divides knowledge into substructures by
representing stereotypes situations.
41
10/1/2022
3. Frame Representation
● The various aspects of a slot is known as Facets.
● Facets are features of frames which enable us to put constraints on the
frames.
● Example: IF-NEEDED facts are called when data of any particular slot is
needed.
● A frame may consist of any number of slots, and a slot may include any
number of facets and facets may have any number of values.
● A frame is also known as slot-filter knowledge representation in artificial
intelligence.
3. Frame Representation
● Frames are derived from semantic networks and later evolved into our
modern-day classes and objects.
● A single frame is not much useful.
● Frames system consist of a collection of frames which are connected. In
the frame, knowledge about an object or event can be stored together in the
knowledge base.
● The frame is a type of technology which is widely used in various
applications including Natural language processing and machine visions.
42
10/1/2022
43
10/1/2022
4. Production Rules
Production rules system consist of (condition, action) pairs which mean, "If condition
then action".
It has mainly three parts:
1. The set of production rules
2. Working Memory
3. The recognize-act-cycle
Example:
● IF (at bus stop AND bus arrives) THEN action (get into the bus)
● IF (on the bus AND paid AND empty seat) THEN action (sit down).
● IF (on bus AND unpaid) THEN action (pay charges).
● IF (bus arrives at destination) THEN action (get down from the bus).
4. Production Rules
● In production rules agent checks for the condition and if the condition exists then
production rule fires and corresponding action is carried out. The condition part
of the rule determines which rule may be applied to a problem. And the action
part carries out the associated problem-solving steps. This complete process is
called a recognize-act cycle.
● The working memory contains the description of the current state of problems-
solving and rule can write knowledge to the working memory. This knowledge
match and may fire other rules.
● If there is a new situation (state) generates, then multiple production rules will be
fired together, this is called conflict set. In this situation, the agent needs to select
a rule from these sets, and it is called a conflict resolution.
44
10/1/2022
4. Production Rules
Advantages of Production rule:
1. Production rule system does not exhibit any learning capabilities, as it does
not store the result of the problem for the future uses.
2. During the execution of the program, many rules may be active hence rule-
based production systems are inefficient.
45
10/1/2022
Unfortunately, this is not the case. The application of logic in AI systems development
is actually quite controversial.
46
10/1/2022
47
10/1/2022
Example:
a) 2+2 is 4, it is an atomic proposition as it is a true fact.
b) "The Sun is cold" is also a proposition as it is a false fact.
Compound proposition
Compound propositions are constructed by combining simpler
or atomic propositions, using parentheses and logical
connectives.
Example:
a) "It is raining today, and street is wet."
b) "Ankit is a doctor, and his clinic is in Mumbai."
48
10/1/2022
Logical connectives
● Logical connectives are used to connect two simpler
propositions or representing a sentence logically.
● We can create compound propositions with the help of logical
connectives.
● There are mainly five connectives, which are given as follows:
a. Negation
b. Conjunction
c. Disjunction
d. Implication
e. Biconditional
Logical connectives
49
10/1/2022
Logical connectives
Logical connectives
50
10/1/2022
51
10/1/2022
52
10/1/2022
Precedence of connectives
Just like arithmetic operators, there is a precedence order for propositional
connectors or logical operators. This order should be followed while evaluating a
propositional problem. Following is the list of the precedence order for operators:
Precedence Operators
Note: For better
First Precedence Parenthesis
understanding use
parentheses to make sure of
Second Precedence Negation
the correct interpretations.
Such as ¬R∨ Q, It can be
Third Precedence Conjunction(AND) interpreted as (¬R) ∨ Q.
53
10/1/2022
Logical equivalence:
Logical equivalence is one of the features of propositional logic. Two propositions
are said to be logically equivalent if and only if the columns in the truth table are
identical to each other.
Let's take two propositions A and B, so for logical equivalence, we can write it as
A⇔B. In below truth table we can see that column for ¬A∨ B and A→B, are
identical hence A is Equivalent to B.
Properties of Operators:
● Commutativity:
○ P∧ Q= Q ∧ P, or
○ P ∨ Q = Q ∨ P.
● Associativity:
○ (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
○ (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
● Identity element:
○ P ∧ True = P,
○ P ∨ True= True.
54
10/1/2022
Properties of Operators:
● Distributive:
○ P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
○ P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
● DE Morgan's Law:
○ ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
○ ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
● Double-negation elimination:
○ ¬ (¬P) = P.
55
10/1/2022
Computational Logic
•Also called symbolic logic and dates back to Aristotle (384 – 322BC)
•In AI, logic is used to
1.express statements
2.Validly infer additional statements
3.To rigorously prove/disprove statements
Computational Logic
Extensions of classical logic (monotonic) are
1.Non-monotonic logic – when observation of new facts often cause revision of
previously believed facts.
2.Temporal logic – related to time
3.Fuzzy logic, probabilistic logic or multi-valued logic – those that deal with
uncertainties
All these can be formulated mathematically
Inference: the process of deducing new facts from other existing facts
Induction: reasoning from a part to the whole.
Deduction: a logically sound and systematic inference procedure
56
10/1/2022
Computational Logic
Axiom: a statement that is always true
Symbolic logic uses mathematical symbols to represent statements
Computational
Logic
57
10/1/2022
Computational Logic
Statement, assertion, proposition = a declarative sentence that is either true or false.
Analysis of
Compound 1.Implication
Statements 2.Deduction
Using Simple Logical https://classroom.google.com/w/NDk2ODk0
Connectives MTY0MDEy/tc/NTM3MTIxMjcwMjU0
58
10/1/2022
The language
of logic -
Statements
59
10/1/2022
Implication
● In developing knowledge representations, one of the most useful logical
connectives is the implication (IF) operator.
60
10/1/2022
Implication
● When written as p → q, the term on the left (the antecedent, i.e., p) implies the
term on the right (the consequent, i.e., q).
● If the implication is TRUE when the term on the left is TRUE, the term on the
right must also be TRUE.
61
10/1/2022
62
10/1/2022
Inference rules:
1. Implication: It is one of the logical connectives which can be represented as P
→ Q. It is a Boolean expression.
2. Converse: The converse of implication, which means the right-hand side
proposition goes to the left-hand side and vice-versa. It can be written as Q →
P.
3. Contrapositive: The negation of converse is termed as contrapositive, and it
can be represented as ¬ Q → ¬ P.
4. Inverse: The negation of implication is called inverse. It can be represented as
¬ P → ¬ Q.
https://www.javatpoint.com/rules-of-inference-in-artificial-intelligence
63
10/1/2022
64
10/1/2022
5. Addition
6. Simplification
7. Resolution
https://www.javatpoint.com/rules-of-inference-in-artificial-intelligence
65
10/1/2022
66
10/1/2022
67
10/1/2022
Inference Net
Inference Net
● This type of diagram is referred to as an inference net.
● Inference nets are seldom as simple as that shown; for example, in databases
containing 10,000 rules, it may not even be practical to view the inference net.
● The action indicated by following an arrow from the antecedent of a rule to the
consequent (and thus producing a statement whose truth value is known to be
TRUE) is shown.
● This is also referred to as firing the rule.
● The process of deciding which rule to fire is fundamental to our inference
control strategy.
68
10/1/2022
PREDICATE FUNCTIONS.
69
10/1/2022
Practice Problems
Practice Problems -1
70
10/1/2022
Practice Problems -1
Practice Problems -1
71
10/1/2022
Practice Problems -1
Practice Problems
Refer to the documents shared on the link below to practice for 10 mark
questions.
https://classroom.google.com/c/NDk2ODk0MTY0MDEy/m/NDg4Njc4MTEzMTA0
/details
72
10/1/2022
73