CH 4 Knowledge Representation
CH 4 Knowledge Representation
Knowledge
Representation
Reasoning
Logical Agents
Agents with some representation of complex knowledge about the world/environment and uses inference(with the help of
old knowledge, taking new inputs and generating new concepts) to deliver new information from the knowledge combined
with new inputs.
Knowledge based agents
Knowledge base is a set of sentences in a formal language representing facts of the world.
● Intelligent agents need knowledge about the world to choose good actions/decisions.
● Knowledge = {sentences} in a knowledge representation language
● A sentence is an assertion about the world
● A knowledge based agent is composed of:
○ Knowledge based
○ Inference mechanism
Knowledge Representation Systems
Knowledge Representation in AI describes the representation of knowledge. Basically, it is a study of how the beliefs,
intentions, and judgments of an intelligent agent can be expressed suitably for automated reasoning. One of the
primary purposes of Knowledge Representation includes modeling intelligent behavior for an agent.
Knowledge Representation and Reasoning (KR, KRR) represents information from the real world for a computer to
understand and then utilize this knowledge to solve complex real-life problems like communicating with human
beings in natural language. Knowledge representation in AI is not just about storing data in a database, it allows a
machine to learn from that knowledge and behave intelligently like a human being.
Properties of Knowledge Representation Systems
1. Semantic Nets,
2. Frames,
3. Conceptual Dependencies
4. Scripts
5. Rule Based Systems
Types of Knowledge Representation Systems: Semantic Nets
Types of Knowledge Representation Systems: Frames
Types of Knowledge Representation Systems: Conceptual Dependencies
It is an another knowledge representation technique. Scripts are frame like structures used to represent commonly occurring experiences such
as going to restaurant, visiting a doctor. A script is a structure that describes a stereotyped sequence of events in a particular context. A script
consist of a set of slots. Associated with each slot may be some information about what kinds of values it may contain as well as a default
value to be used if no other information is available. Scripts are useful because in the real world, there are no patterns to the occurrence of
events. These patterns arise because of clausal relationships between events. The events described in a script form a giant casual chain. The
beginning of the chain is the set of entry conditions which enable the first events of the script to occur. The end of the chain is the set of results
which may enable later events to occur. The headers of a script can all serve as indicators that the script should be activated.
● The literal meaning of a proposition is to put across one’s views, ideas, suggestions, expression or
judgment. The proposition can be done through a formal document or oral communication (Informal). It can
either address a positive or negative connotation.
● A proposition in logic includes Boolean functionalities in a sentence to make it either True or False and also
adds reasoning techniques and proofing methods to make it much more comprehensive. This logic is a very
old and widely adopted one.
● This logic was readily embraced by the modern search algorithm in Artificial Intelligence applications and
Computer-aided tools. It’s use cases in AI include planning, decision making, smart control, diagnosis and
problem-solving areas in Business, Medical, Education fields.
Propositional Logic
● Syntax,
● Semantics,
● Formal logic -connectives,
● truth tables,
● tautology,
● validity,
● well -formed -formula,
● Inference using Resolution,
● Backward Chaining and Forward Chaining
Propositional Logic:Syntax
The syntax of propositional logic defines the allowable sentences. The atomic sentences
consist of a single proposition symbol. Each such symbol stands for a proposition that can
be true or false. We use symbols that start with an uppercase letter and may contain other
letters or subscripts, for example: , , , , and FacingEast. The names are arbitrary but are
often chosen to have some mnemonic value.
There are two proposition symbols with fixed meanings: True is the always-true proposition
and False is the always-false proposition.
The semantics defines the rules for determining the truth of a sentence with respect to a particular model.
In propositional logic, a model simply sets the truth value—true or false— for every proposition symbol.
For example, if the sentences in the knowledge base make use of the proposition symbols , and , then
one possible model is
Forward Chaining and Back
Forward Chaining and Backward Chaining are the two most important strategies in the field of Artificial Intelligence and lie in the Expert
System Domain of AI. Forward and Backward chaining is the strategies used by the Inference Engine in making the deductions.
Inference Engine:
Inference Engine is a component of the expert system that applies logical rules to the knowledge base to deduce new information. It
interprets and evaluates the facts in the knowledge base in order to provide an answer.
Forward Chaining:
Forward Chaining the Inference Engine goes through all the facts, conditions and derivations before deducing the outcome i.e When based
on available data a decision is taken then the process is called as Forwarding chaining, It works from an initial state and reaches to the
goal(final decision).
Backward Chaining
In this, the inference system knows the final decision or goal, this system starts from the goal and works
backwards to determine what facts must be asserted so that the goal can be achieved, i.e it works from goal(final
decision) and reaches the initial state.
Example:
B
A -> B
A
—————————–
He is sweating.
If he is running, he sweats.
He is running.
Difference
between
Forward and
Backward
Chaining
To be Contd..
Predicate Logic
in propositional logic, we can only represent the facts, which are either true or false. PL is not sufficient to represent the complex
sentences or natural language statements. so we required some more powerful logic, such as first-order logic.
The basic syntactic elements of first-order logic are the symbols that stand for objects, relations, and functions. The symbols,
therefore, come in three kinds:
First-order logic (like natural language) does not only assume that the world contains facts like propositional logic but also assumes
the following things in the world:
○ Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus, ......
○ Relations: It can be unary relation such as: red, round, is adjacent, or n-any relation such as: the sister of, brother
of, has color, comes between
○ Function: Father of, best friend, third inning of, end of, ......
Predicate Logic has two such quantifiers: ∀ (the universal quantifier) and ∃ (the existential quantifier) . Since a
predicate can combine with more than one variable, it is necessary to write the variable immediately after the quantifier to
indicate which variable the quantifier interacts with.
Key aspects of knowledge representation languages are:
Syntax has to do with what ‘things’ (symbols, notations) one is allowed to use in the language and in what way;
there is/are a(n):
● Alphabet
● Language constructs
● Sentences to assert knowledge
Semantics, Formal meaning, which has to do what those sentences with the alphabet and constructs are
supposed to mean.
Predicate Logic: Syntax
The syntax tells, how programs must be written, where blanks are allowed, where
semi|colons must be written, whether to use brackets or parentheses, etc.), a well|
formed expression in a programming language is a program that passed the
compiler without úsyntax errorø.
Predicate Logic: Semantics
Quantifiers are phrases that refer to given quantities, such as "for some" or "for all"
or "for every", indicating how many objects have a certain property.
– Universal Quantifier: represented by , “for all”, “for every”, “for each”, or “for any”.