1. Unity University
Faculty of Engineering and Technology
Department of Computer Science and MIS
Fundamental Artificial Intelligence
Name
RAHEL TSEGAYE
Section
CCSCS1R1N2/13
ID :
UU87786R
Submitteddate:dec25/2023
Submitted to MR Getahun Gezu
Knowledge Base Agents
2. Knowledge-based agents are those agents who have the capability of maintaining an
internal state of knowledge, reason over that knowledge, update their knowledge after
observations and take actions. These agents can represent the world with some formal
representation and act intelligently.
Knowledge-based agents are composed of two main parts:
Knowledge-base and
Inference system.
A knowledge-based agent must able to do the following:
An agent should be able to represent states, actions, etc.
An agent Should be able to incorporate new precepts
An agent can update the internal representation of the world
An agent can deduce the internal representation of the world
An agent can deduce appropriate actions.
Knowledge base
Knowledge-base is a central component of a knowledge-based agent, it is also known as
KB. It is a collection of sentences (here 'sentence' is a technical term and it is not
identical to sentence in English). These sentences are expressed in a language which is
called a knowledge representation language. The Knowledge-base of KBA stores fact
about the world.
Inference system
Inference means deriving new sentences from old. Inference system allows us to add a
new sentence to the knowledge base. A sentence is a proposition about the world.
Inference system applies logical rules to the KB to deduce new information.
Inference system generates new facts so that an agent can update the KB. An inference
system works mainly in two rules which are given as:
Forward chaining
Backward chaining
Following are three operations which are performed by KBA in order to show the
intelligent behavior:
TELL: This operation tells the knowledge base what it perceives from the environment.
ASK: This operation asks the knowledge base what action it should perform.
Perform: It performs the selected action.
The knowledge-based agent takes precept as input and returns an action as output. The
agent maintains the knowledge base, KB, and it initially has some background
knowledge of the real world. It also has a counter to indicate the time for the whole
process, and this counter is initialized with zero.
Each time when the function is called, it performs its three operations:
3. Firstly it TELLS the KB what it perceives.
Secondly, it asks KB what action it should take
Third agent program TELLS the KB that which action was chosen.
The MAKE-PRECEPT-SENTENCE generates a sentence as setting that the agent perceived
the given precept at the given time.
The MAKE-ACTION-QUERY generates a sentence to ask which action should be done at
the current time.
MAKE-ACTION-SENTENCE generates a sentence which asserts that the chosen action
was executed.
Propositional Logic: Syntax and Semantics
Propositional logic is a formal system that deals with propositions, which are statements
that can be either true or false. It provides a foundation for reasoning and logical
deductions. Let's explore the syntax and semantics of propositional logic.
Syntax of Propositional Logic
The syntax of propositional logic specifies the rules for constructing well-formed
formulas (WFFS). A WFF is a statement that can be assigned a truth value. The syntax
includes the following elements:
Propositional Variables: These are symbols used to represent propositions. Commonly
used symbols include A, B, C, P, Q, R, etc.
Logical Connectives: These are symbols that connect propositions and form compound
propositions. Some common logical connectives are:
Negation (¬): Represents the negation or denial of a proposition.
Conjunction (∧): Represents the logical "and" operation between two propositions.
Disjunction (∧): Represents the logical "or" operation between two propositions.
Implication (→): Represents the logical "if-then" relationship between two
propositions.
Bi conditional (↔): Represents the logical equivalence between two propositions.
Parentheses: Used to group propositions and specify the order of operations.
By combining these elements according to the syntax rules, we can create complex
propositions in propositional logic.
Some examples of well-formed formulas and their meanings are:
p ∧ q: this formula means that both p and q are true.
¬p ∧ q: this formula means that either p is false or q is true, or both.
p → q: this formula means that if p is true, then q is true.
p ↔ q: this formula means that p and q have the same truth value, either both true or
both false.
4. Semantics of Propositional Logic
The semantics of propositional logic deals with the meaning and interpretation of
propositions. It assigns truth values (true or false) to propositions based on the truth
values of their constituent parts. The semantics includes the following concepts:
Truth Assignments: A truth assignment is a mapping that assigns a truth value (true or
false) to each propositional variable in a given proposition.
Truth Tables: Truth tables are used to systematically determine the truth value of a
compound proposition based on the truth values of its constituent propositions. Each
row of a truth table represents a different combination of truth values for the
propositional variables, and the final column represents the truth value of the
compound proposition.
Truth table for connectives:
P Q ¬P P ˄ Q P ˅ Q P=>Q P<=>Q
false false true false false true true
false true true false true true false
true false false false true false false
true true false true true true true
Logical Equivalence: Two propositions are said to be logically equivalent if they have
the same truth value for every possible combination of truth values of their constituent
propositions.
By using truth assignments and truth tables, we can evaluate the truth values of complex
propositions and determine their logical relationships.
Theorem Proving and Inference
Theorem proving and inference are fundamental concepts in logic and mathematics.
Let's explore these concepts in more detail.
Theorem Proving
Theorem proving is the process of demonstrating the truth of a mathematical statement
or proposition, known as a theorem. It involves constructing a logical argument or proof
that establishes the validity of the theorem based on a set of axioms, definitions, and
previously proven theorems.
The process of theorem proving can be done manually by mathematicians or automated
using computer programs. Automated theorem proving involves the use of formal logic
and algorithms to mechanically verify the correctness of mathematical proofs. These
programs employ various techniques, such as resolution, model checking, and tableau
methods, to search for a valid proof.
Automated theorem proving has applications in various fields, including mathematics,
computer science, and formal verification. It can help verify the correctness of complex
5. mathematical theorems, validate software and hardware systems, and assist in the
development of artificial intelligence systems.
Inference
Inference, in the context of logic, refers to the process of deriving new conclusions or
statements from existing information or premises. It involves applying logical rules and
reasoning to draw logical consequences from given facts or propositions.
Inference can be deductive or inductive. Deductive inference involves deriving
conclusions that are necessarily true if the premises are true, based on the rules of logic.
It follows a top-down approach, moving from general principles to specific conclusions.
Deductive reasoning is commonly used in mathematical proofs and formal logic.
Inductive inference, on the other hand, involves deriving conclusions that are likely to be
true based on observed patterns or evidence. It follows a bottom-up approach, moving
from specific observations to general conclusions. Inductive reasoning is used in
scientific research, statistical analysis, and everyday reasoning.
Inference is a fundamental process in logical reasoning and plays a crucial role in various
fields, including philosophy, science, and artificial intelligence.