0% found this document useful (0 votes)
81 views

CSC 409 UPDATED LECTURE NOTE

My lastest lecture notes

Uploaded by

Pedro Ayo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

CSC 409 UPDATED LECTURE NOTE

My lastest lecture notes

Uploaded by

Pedro Ayo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

INTRODUCTION TO ARTIFICIAL INTELLIGENCE (CSC 409)

Course Outline
1. Overview of Artificial Intelligence
2. Underlying concepts of Artificial Intelligence
3. Knowledge modelling and knowledge representation
4. Expert Systems
5. Intro to natural language processing
6. Intro to pattern recognition
7. Intro to Python, Lisp and Prolog
Recommended text: AI for Modern Approach 3rd Edition- Stuart Russell& Peter

OVERVIEW OF ARTIFICIAL INTELLIGENCE


AI is one of the newest sciences. It encompasses some huge subfields
 General Purpose
o Learning
 Specific Tasks
o Gaming
o Proving Mathematical Theorems
o Writing Poetry
o Diagnosing diseases
AI systemizes and automates intellectual tasks, potentially relevant to any sphere of human
intellectual activity and it is truly a universal field.

DEFINITION OF AI
The study of computational agents that act intelligently. An agent acts in an environment and only
has access to its prior knowledge, its history of observations and its goals and preference. An
intelligent agent is a physical symbol system that manipulates symbols to determine what to do.
 Artificial
o Man made
o rather than naturally occurring
 Intelligence
o Ability to acquire and apply knowledge
o State or fact of knowing
o Possessing knowledge, intelligence and understanding

PRACTICAL DEFINITIONS OF AI

(I) Systems that think like humans


The exciting new effort to make computers think, machines with minds in the full and literal sense –
Haugeland 1985
AI is referred to as the automation of activities that will associate with human thinking activities such
as Decision making, problem solving, learning etc. - Bellman 1978

(ii) Systems that think rationally


The study of the mental faculties through the use of computational models – Chamiak&McDermott
The study of computation that makes it easy to perceive, reason, and act – Winston 1992

(iii) Systems that behave like humans


The art of creating machines that perform functions that require intelligence when performed by
people – Kurzwell 1991
The study of how to make computers do things at which, at the moment, people are better – Rich and
Knight 1991

(iv) Systems that act rationally

omputational intelligence is the study of the design of intelligent agents – Poole et al 1998
AI is concerned with intelligent behavior in artifacts – Nilsson 1998
GOALS OF AI
1. Constructing intelligent machines for a wide range of application e.g. augmenting human
problem solving
2. Formalizing knowledge and mechanizing intelligence
3. Using computational models to understand complex human behavior.
4. Making computers as easy to work with as people
WHY IS AI PRACTICAL
1. Cheaper sensors and better sensor processing
2. Order of magnitude in computational power e.g. Commodity processors, special purpose
processor for sensor processing and parallel/cloud computing
3. Availability of tremendous amounts of information.

APPLICATION AREAS OF AI

1. Speech recognition
2. Scheduling and planning e.g. American airline re-routing contingency planner
3. Computer vision- face recognition programs in use by banks and governments etc. Handwriting
recognition, electronic and manufacturing inspection, baggage inspection, automation of 3D
geometric model constructions
4. Diagnostic systems e.g. pathfinders for diagnosis of lymph node disease
5. Financial decision making
6. System configuration
7. Classification of systems
8. Mathematical theory proving: use inference method to prove new theories
9. Game playing: computer programs beats world best player in chess, checkers and backgammon
10. Machine translation
11. Robotic vehicles
12. Logistic planning
13. Robotics

Types of Artificial Intelligence:

Artificial Intelligence can be divided in various types, there are mainly two types of main
categorization which are based on capabilities and based on functionally of AI. Following is flow
diagram which explain the types of AI.

AI type-1: Based on Capabilities

1. Weak AI or Narrow AI:


2. Narrow AI is a type of AI which is able to perform a dedicated task with intelligence. The
most common and currently available AI is Narrow AI in the world of Artificial Intelligence.
3. Narrow AI cannot perform beyond its field or limitations, as it is only trained for one specific
task. Hence it is also termed as weak AI. Narrow AI can fail in unpredictable ways if it goes
beyond its limits.
4. Apple Siriis a good example of Narrow AI, but it operates with a limited pre-defined range of
functions.
5. IBM's Watson supercomputer also comes under Narrow AI, as it uses an Expert system
approach combined with Machine learning and natural language processing.
6. Some Examples of Narrow AI are playing chess, purchasing suggestions on e-commerce site,
self-driving cars, speech recognition, and image recognition.

. General AI:

o General AI is a type of intelligence which could perform any intellectual task with efficiency
like a human.
o The idea behind the general AI to make such a system which could be smarter and think like
a human by its own.
o Currently, there is no such system exist which could come under general AI and can perform
any task as perfect as a human.
o The worldwide researchers are now focused on developing machines with General AI.
o As systems with general AI are still under research, and it will take lots of efforts and time to
develop such systems.
3. Super AI:

o Super AI is a level of Intelligence of Systems at which machines could surpass human


intelligence, and can perform any task better than human with cognitive properties. It is an
outcome of general AI.
o Some key characteristics of strong AI include capability include the ability to think, to
reason,solve the puzzle, make judgments, plan, learn, and communicate by its own.
o Super AI is still a hypothetical concept of Artificial Intelligence. Development of such
systems in real is still world changing task.

Artificial Intelligence type-2: Based on functionality

1. Reactive Machines

o Purely reactive machines are the most basic types of Artificial Intelligence.
o Such AI systems do not store memories or past experiences for future actions.
o These machines only focus on current scenarios and react on it as per possible best action.
o IBM's Deep Blue system is an example of reactive machines.
o Google's AlphaGo is also an example of reactive machines.

2. Limited Memory

o Limited memory machines can store past experiences or some data for a short period of time.
o These machines can use stored data for a limited time period only.
o Self-driving cars are one of the best examples of Limited Memory systems. These cars can
store recent speed of nearby cars, the distance of other cars, speed limit, and other
information to navigate the road.

3. Theory of Mind

o Theory of Mind AI should understand the human emotions, people, beliefs, and be able to
interact socially like humans.
o This type of AI machines are still not developed, but researchers are making lots of efforts
and improvement for developing such AI machines.

4. Self-Awareness

o Self-awareness AI is the future of Artificial Intelligence. These machines will be super


intelligent, and will have their own consciousness, sentiments, and self-awareness.
o These machines will be smarter than human mind.
o Self-Awareness AI does not exist in reality still and it is a hypothetical concept.

ADVANTAGE OF ARTIFICIAL INTELLIGENCE OVER NATURAL INTELLIGENCE


1. Ease of duplication
2. Less expensive
3. Can be documented
4. Consistent and thorough
5. Can execute certain tasks much faster than a human can
6. Can perform certain tasks better than many or even more people.
NATURAL INTELLEGENCE ADVANTAGES OVER A.I.
1. Creativity
2. People use sensory experience directly
3. Can use a wide context of experience in different situations while A.I. is narrowly focused.

DIFFERENCE BETWEEN A.I. AND CONVENTIONAL COMPUTING

Conventional Computing
1. Conventional computing is based on algorithm (clearly defined step-by-step procedure)
2. Mathematical formula or sequential procedure
3. Converted into a computer program
4. Makes use of data (number, letter in words)
5. Limited to very structured quantitative applications
Artificial Intelligence
1. Based on symbolic representation and manipulation of knowledge
2. A symbol is a letter, words or numbers which represents object, processes and their environment
3. Creates a symbolic knowledge base
4. Uses various process to manipulate the symbols to generate advice or a recommendation
5. Reasons or infer with the knowledge based on search and pattern matching
6. Hunts for answers

MAJOR A.I. AREAS


 Computer vision:Deals with intelligence visualization, scene analysis, image understanding in
processes and motion derivation.

 Learning:This topic deals with research and development in different forms of development

 Neural network:Simulation of learning a human brain by combining pattern recognition task,


deductive reasoning and numerical computations.

 Expert systems:This deals with knowledge processing and complex decision-making problems.
 Robotics:The controlling of robots to manipulate or grasp objects and using information from
sensors to guide actions.

 Problem solving and planning:This deal with systematic refinement of goal hierarchy, plan
revision mechanism and a focused search of important goals.

 Genetic algorithm:These are adaptive algorithm with have learning capabilities. They are used in
research, machine learning and optimization
 Pattern recognition: This is the study of how machines can observe the environment, learn to
distinguish patterns of interest and make sound and reasonable decision about a category of the
pattern.
 Machine Learning is a subset of Artificial Intelligence which provides Machine the ability to
learn mathematically and improve from experience without being explicitly programmed.
Machine Learning Process involves building a predictive model that can be used to find solution
for a problem statement.
 Deep-learning architectures rely on the perceptron as the basis of neural networks, often
involving large or massive datasets. Such architectures also involve heuristics and empirical
results. is a subset of machine learning which makes the multi neural network visible.

EMERGING INNOVATIVE APPLICATIONS OF A.I.


1. Health sector:
Autonomous long term patient health monitoring using a network of light-weight sensors and
recognize user activities (falls, shock) from sensors.

2. Computer science:
Network security, risk assessment and monitoring, autonomic self-reconfiguring of computer
systems.

3. Electrical industry:
Multi objective optimization of power distribution system operation.

4. Intelligent web services:


Auto categorization of web based pictures

5. Anti-terrorism/emergence reports:
Simulator for teaching police force in urban environment and a training tool to coordinate
various disasters and emergency response such as fire engines and police car.
Types of AI problems

With this background, we now discuss the twelve types of AI problems.

1) Domain expert: Problems which involve Reasoning based on a complex body of knowledge

This includes tasks which are based on learning a body of knowledge like Legal, financial etc. and
then formulating a process where the machine can simulate an expert in the field

2) Domain extension: Problems which involve extending a complex body of Knowledge

Here, the machine learns a complex body of knowledge like information about existing medication
etc. and then can suggest new insights to the domain itself – for example new drugs to cure diseases.

3) Complex Planner: Tasks which involve Planning

Many logistics and scheduling tasks can be done by current (non AI) algorithms. But increasingly, as
the optimization becomes complex AI could help. One example is the use of AI techniques in IoT for
Sparse datasets AI techniques help on this case because we have large and complex datasets where
human beings cannot detect patterns but a machine can do so easily.

4) Better communicator: Tasks which involve improving existing communication

AI and Deep Learning benefit many communication modes such as automatic translation, intelligent
agents etc

5) New Perception: Tasks which involve Perception

AI and Deep Learning enable newer forms of Perception which enables new services such as
autonomous vehicles

6) Enterprise AI: AI meets Re-engineering the corporation!

While autonomous vehicles etc get a lot of media attention, AI will be deployed in almost all sectors
of the economy. In each case, the same principles apply i.e. AI will be used to create new insights
from automatic feature detection via Deep Learning – which in turn help to optimize, improve or
change a business process (over and above what can be done with traditional machine learning). I
outlined some of these processes in financial services in a previous blog: Enterprise AI insights from
the AI Europe event in London. In a wider sense, you could view this as Re-engineering the
Corporation meets AI/ Artificial Intelligence. This is very much part of the Enterprise AI course

7) Enterprise AI adding unstructured data and Cognitive capabilities to ERP and Datawarehousing

For reasons listed above, unstructured data offers a huge opportunity for Deep Learning and hence
AI. As per Bernard Marr writing in Forbes: “The vast majority of the data available to most
organizations is unstructured – call logs, emails, transcripts, video and audio data which, while full of
valuable insights, can’t easily be universally formatted into rows and columns to make quantitative
analysis straightforward. With advances in fields such as image recognition, sentiment analysis and
natural language processing, this information is starting to give up its secrets, and mining it will
become increasingly big business in 2017.” I very much agree to this. In practise, this will mean
enhancing the features of ERP and Datawarehousing systems through Cognitive systems.

8) Problems which impact domains due to second order consequences of AI

David Kelnar says in The fourth industrial revolution a primer on artificial intelligenc…

“The second-order consequences of machine learning will exceed its immediate impact. Deep
learning has improved computer vision, for example, to the point that autonomous vehicles (cars and
trucks) are viable. But what will be their impact? Today, 90% of people and 80% of freight are
transported via road in the UK. Autonomous vehicles alone will impact: safety (90% of accidents are
caused by driver inattention) employment (2.2 million people work in the UK haulage and logistics
industry, receiving an estimated £57B in annual salaries) insurance (Autonomous Research
anticipates a 63% fall in UK car insurance premiums over time) sector economics (consumers are
likely to use on-demand transportation services in place of car ownership); vehicle throughput; urban
planning; regulation and more. “

9) Problems in the near future that could benefit from improved algorithms

A catch-all category for things which were not possible in the past, could be possible in the near
future due to better algorithms or better hardware. For example, in Speech recognition,
improvements continue to be made and currently, the abilities of the machine equal that of a human.
From 2012, Google used LSTMs to power the speech recognition system in Android. Just six weeks
ago, Microsoft engineers reported that their system reached a word error rate of 5.9% — a figure
roughly equal to that of human abilities for the first time in history. The goal-post continues to be
moved rapidly .. for example loom.ai is building an avatar that can capture your personality

10) Evolution of Expert systems

Expert systems have been around for a long time. Much of the vision of Expert systems could be
implemented in AI/Deep Learning algorithms in the near future. If you study the architecture of IBM
Watson, you can see that the Watson strategy leads to an Expert system vision. Of course, the same
ideas can be implemented independently of Watson today.

11) Super Long sequence pattern recognition

This domain is of personal interest to me due to my background with IoT see my course at Oxford
University Data Science for Internet of Things. I got this title from a slide from Uber’s head of Deep
Learning who I met at the AI Europe event in London. The application of AI techniques to sequential
pattern recognition is still an early stage domain(and does not yet get the kind of attention as CNNs
for example) – but in my view, this will be a rapidly expanding space. For some background see this
thesis from Technische Universitat Munchen (TUM) Deep Learning For Sequential P… and also
this blog by Jakob Aungiers LSTM Neural Network for Time Series Prediction

12) Extending Sentiment Analysis using AI

The interplay between AI and Sentiment analysis is also a new area. There are already many
synergies between AI and Sentiment analysis because many functions of AI apps need sentiment
analysis features.
“The common interest areas where Artificial Intelligence (AI) meets sentiment analysis can be
viewed from four aspects of the problem and the aspects can be grouped as Object identification,
Feature extraction, Orientation classification and Integration. The existing reported solutions or
available systems are still far from being perfect or fail to meet the satisfaction level of the end users.
The main issue may be that there are many conceptual rules that govern sentiment and there are even
more clues (possibly unlimited) that can convey these concepts from realization to verbalization of a
human being.” source: SAAIP

Notes: the post The fourth industrial revolution a primer on artificial intelligenc… also offers a good
insight on AI domains also see #AI application areas – a paper review of AI applications (pdf)

Problem Solving Techniques in AI


The process of problem-solving is frequently used to achieve objectives or
resolve particular situations. In computer science, the term "problem-solving"
refers to artificial intelligence methods, which may include formulating ensuring
appropriate, using algorithms, and conducting root-cause analyses that identify
reasonable solutions. Artificial intelligence (AI) problem-solving often involves
investigating potential solutions to problems through reasoning techniques,
making use of polynomial and differential equations, and carrying them out and
use modelling frameworks. A same issue has a number of solutions, that are all
accomplished using an unique algorithm. Additionally, certain issues have
original remedies. Everything depends on how the particular situation is framed.

Cases involving Artificial Intelligence Issues


Artificial intelligence is being used by programmers all around the world to
automate systems for effective both resource and time management. Games
and puzzles can pose some of the most frequent issues in daily life. The use of
ai algorithms may effectively tackle this. Various problem-solving methods are
implemented to create solutions for a variety complex puzzles, includes
mathematics challenges such crypto-arithmetic and magic squares, logical
puzzles including Boolean formulae as well as N-Queens, and quite well games
like Sudoku and Chess. Therefore, these below represent some of the most
common issues that artificial intelligence has remedied:

o Chess
o N-Queen problem
o Tower of Hanoi Problem
o Travelling Salesman Problem
o Water-Jug Problem

Approaches for Resolving Problems


The effective approaches of artificial intelligence make it useful for resolving
complicated issues. All fundamental problem-solving methods used throughout
AI were listed below. In accordance with the criteria set, students may learn
information regarding different problem-solving methods.
Heuristics
The heuristic approach focuses solely upon experimentation as well as test
procedures to comprehend a problem and create a solution. These heuristics
don't always offer better ideal answer to something like a particular issue,
though. Such, however, unquestionably provide effective means of achieving
short-term objectives. Consequently, if conventional techniques are unable to
solve the issue effectively, developers turn to them. Heuristics are employed in
conjunction with optimization algorithms to increase the efficiency because they
merely offer moment alternatives while compromising precision.

Searching Algorithms
Several of the fundamental ways that AI solves every challenge is through
searching. These searching algorithms are used by rational agents or problem-
solving agents for select the most appropriate answers. Intelligent entities use
molecular representations and seem to be frequently main objective when
finding solutions. Depending upon that calibre of the solutions they produce,
most searching algorithms also have attributes of completeness, optimality,
time complexity, and high computational.

Computing Evolutionary
This approach to issue makes use of the well-established evolutionary idea. The
idea of "survival of the fittest underlies the evolutionary theory. According to
this, when a creature successfully reproduces in a tough or changing
environment, these coping mechanisms are eventually passed down to the later
generations, leading to something like a variety of new young species. By
combining several traits that go along with that severe environment, these
mutated animals aren't just clones of something like the old ones. The much
more notable example as to how development is changed and expanded is
humanity, which have done so as a consequence of the accumulation of
advantageous mutations over countless generations.

Genetic Algorithms
Genetic algorithms have been proposed upon that evolutionary theory. These
programs employ a technique called direct random search. In order to combine
the two healthiest possibilities and produce a desirable offspring, the developers
calculate the fit factor. Overall health of each individual is determined by first
gathering demographic information and afterwards assessing each individual.
According on how well each member matches that intended need, a calculation
is made. Next, its creators employ a variety of methodologies to retain their
finest participants.

1. Rank Selection
2. Tournament Selection
3. Steady Selection
4. Roulette Wheel Selection (Fitness Proportionate Selection)
5. Elitism
WHY A.I. IS HARD
1. Uncertainty in the information that is sensed from the environment
2. The lack of complete theories that fully explain naturally occurring phenomenon
3. The bounded rationality of computation that fully makes it impossible to access all options
4. The situation of specificity of knowledge: there is rarely common sense knowledge that can be
applied uniformly over a broad spectrum of real world situations.

A.I. TECHNIQUES
An A.I. technique is a method that exploits knowledge in solving a problem.
Nature of knowledge;
 Knowledge is voluminous
 It is constantly changing
 It is hard to characterize accurately
 It differs from data by being organized in a way that corresponds to the way it will be used

An A.I. technique must exploit knowledge in such a way that;


 The knowledge captures generalizations
 It can be understood by people who must provide it
 It can easily be modified to correct errors and reflect changes in the world and our world view
 It can be used in a great many situation even if it’s not totally accurate or complete
 It can be used to help overcome its own sheer bulk by helping to narrow the range of possibilities
that must be considered.

CHARACTERISTICS OF A.I. TECHNIQUES


 Use of knowledge: Provides a way of solving complex problems by exploiting the structures
of the objects that are involved.

 Abstraction: Provides a way of separating important features and variables from many
unimportant ones that will otherwise overwhelm the process.

 Search: A way of solving important problems for which no more direct approach is available
as well as a framework into which any direct technique that are available can be embedded.
UNDERLYING CONCEPTS OF ARTRIFICIAL INTELLIGENCE
Agent: an agent is anything that can be viewed as perceiving its environment through sensors
and acting upon that environment through actuators.
An agent includes
1. Humans
2. Robots
3. Software
4. Thermostats
5. Airplanes etc.
We are interested in what agent does, that is how it acts and we judge an agent by its actions.
Percept: refers to an agent perceptual input at any given instance. An agent percept sequence is the
complete history of everything the agent has ever conceived.
In general, an agent choice of action at any given instant can depend on the entire sequence
percept observed to date but not on anything, it has not perceived.

A rational agent is one that does the right thing. A rational agent takes action it believes will achieve
its goals or takes action by considering the consequence of its behaviour.
What is rational at any given time depends on four things;
1. The performance measure that defines the criterion of success.
2. The agent’s prior knowledge of the environment.
3. The action that the agent can perform.
4. The agent’s percept sequence to date.

Definition of Rational Agent: for each possible percept sequence, a rational agent should select
an action that is expected to maximize performance measure, given the evidence provided by the
percept sequence and whatever built-in knowledge the agent has.

TASK ENVIRONMENT
S/N AGENT PERFORMANCE ENVIRONMENT ACTUATOR SENSORS
TYPE S
1 Medical Healthy patient, Patient, hospital Display of Keyboard
diagnosis reduced cost and staff question, test entry of
system diagnoses, symptoms
treatment findings,
referrals patient
answers
2 Past picking Percentage of part Conveyor belt with Jointed arm Camera, joint
Robot in correct bins parts; bins and hand angle sensors
3 Satellite Correct image Downlink from Display of Colour pixel
image categorization orbiting satellite scene arrays
analysis categories
system
4 Taxi driver Safety, fast, legal, Road, other traffic Steering, GPS, sonar,
comfortable trips pedestrians, horns, speedometer,
and maximize customer accelerators, odometer,
profits brake, display camera, engine
etc. sensor,
keyboard etc.
5 Refinery Purity, yield, safety Refinery operators Valves, pumps, Temperature,
controller heaters, display pressure,
chemical
sensor
6 Interactive Student’s score on Set of students Display of Keyboard
English tutor test testing agency exercises, entry
suggestion,
correction

CLASSES OF AGENT ENVIRONMENT


1. Fully observable vs. Partially:
If an agent sensors give it access to the complete state of the environment at each point in
time, then we say that the task environment is fully observant. A task environment is effectively fully
observable if the sensors detect all aspects that are relevant to the choice of action, relevance in turn
depends on performance measure. An environment might be partially observable because of noisy
and inaccurate sensors or because part of the state simply missing from the sensor data.

2. Single agent vs. Multi agent:


The distinction between single agent and multi agent environment may seem simple enough,
for example, am agent solving a crossword puzzle by itself is clearly in a single agent environment
whereas an agent playing chess is in a two-agent environment. The agent design problem in multi
agent environment are often quite different from those in a single agent environment, for example,
communication often emerges as a rational behaviour in a multi agent environment.

3. Deterministic vs. Stochastic:


If the next state of the environment is completely determined by the current state and the
action executed by the agent, then we say the environment is deterministic otherwise it is stochastic.

4. Episodic vs. Sequential:


In an episodic task environment, the agent experience is divided into atomic episodes. In each
episodes, the agent receives a percept and performs a single action in each episode. Crucially, the
next episode does not depend on the action taken in each episode. In sequential environment, on the
other hand, the current decision could affect all decisions. Chess and taxi driving are sequential.

5. Discrete vs. Continuous:


The discrete/continuous distinction applies to the state of the environment, to the way time is
handled, and to the percepts and actions of the agent. For example, the chess environment has a
finite number of distinct states.Chess also has a discrete set of percepts and actions. Taxi driving is a
continuous-state and continuous-time problem: the speed and location of the taxi and of the other
vehicles sweep through a range of continuous values and do so smoothly over time.

6. Known vs. unknown:


In a known environment, the outcomes for all actions are given. Obviously, if the
environment is unknown, the agent will have to learn how it works in order to make good decisions.

7. Static vs. dynamic:


If the environment can change while an agent is deliberating, then we say the environment is
dynamic for that agent; otherwise, it is static. Static environments are easy to deal with because the
agent need not keep looking at the world while it is deciding on an action, nor need it worry about
the passage of time.

INTELLIGENT AGENTS
An agent acts intelligently when:
 What it does is appropriate for its circumstance and its goals.
 It is flexible to changing environment and changing goals.
 It learns from experience.
 It makes appropriate choices given its perceptual and computational limitations.

KNOWLEDGE REPRESENTATION AND MODELLING


Knowledge can be considered as the distillation of information that has been collected,
classified, organized, integrated, abstracted and value-added.

CHARACTERISITICS OF KNOWLEDGE
 Knowledge is voluminous
 It is constantly changing
 It is hard to characterize accurately
 It differs from data by being organized in a way that corresponds to the way it will be used.
ACTIVITIES IN AI ABOUT KNOWLEDGE
o Acquisition
This has to do with creating, finding, collecting and eliciting the necessary information and
knowledge to create a cognitive model. It is highly dependent on the technology that is being
utilized.
o Representation
 This has to with transforming the acquired information and knowledge into a computer
readable model.
 Represents the computer’s knowledge of the world by some kind of data structure in the
machine’s memory.
 Representation = Syntax + Semantics + Reasoning
o Search
This is a problem solving technique that systematically explores a space of problem states.

REPRESENTATION
Representation = Syntax + Semantics + Reasoning
Syntax
i. Syntax can be checked by compilers
ii. Syntax can take on many forms; mathematical, logical, model, cases, rules, graphs, frames and
symbols.

Semantics
i. Must be checked by man.
ii. Specification of behaviors.
iii. Careful attention to semantics allow us to be precise about system capabilities.

Reasoning
 Reasoning with certainty: has to do with deterministic such as propositional logic and predicate
logic.
 Reasoning with uncertainty: has to do with non-deterministicsuch as multi-value logic,
probability theory, Bayesian deduction, certainty factor and fuzzy logic.

KNOWLEDGE REPRESENTATION METHODS


 Knowledge may be represented as “symbol structures” representing bits of knowledge.
 E.g. “red” represents colour red. “car1” represents my car.
 red (car1) represents fact that my car is red.
 A knowledge representation language should allow you to:
 Represent adequately the knowledge you need for your problem.
 Do it in a clear, precise and “natural” way.
 Allow you to reason on that knowledge, drawing new conclusions.
 Knowledge Representation Schemes
 Logical Representation scheme (e.g. propositional or predicate logic)
 Network Representation scheme (e.g. Semantic networks)
 Structural Representation scheme (e.g. Frame)
 Procedural Representation scheme (e.g. Production Rule)
Good knowledge representation languages
 Combines the best of natural and formal languages:
 Expressive
 Concise
 Unambiguous
 Independent of context
 What you say today will still be interpretable
 Efficient
 The knowledge can be represented in a format that is suitable for computers.

Logic as a Knowledge Representation Language


 A Logic is a formal language, with precisely defined syntax and semantics, which supports
reasoning.
 Independent of the domain of application.
 Different logics exist, which allow you to represent different kinds of things, and which allow
more or less efficient inference.
 Propositional logic, Predicate logic, Temporal Logic, Modal Logic, Description logic…
But representing some things in logic may not be very natural, and inferences may not be
efficient.

PROPOSITIONAL LOGIC
 In general a logic is defined by
Syntax: Describes the possible configuration that can constitute sentences.
Semantics: Determines the facts in the world to which the sentences refer.
Reasoning: Process of construction new sentences from old ones.
This relationship is called entailment and can be expressed as
KB|=  (knowledge base KB entails the sentence alpha)
 Propositional Logic: Syntax
 Symbols (e.g. letters, words) are used to represent facts about the world: e.g.
o “P” represents the fact “Ali likes chocolate”.
o “Q” represents the fact “Ali has chocolate”.
 These are atomic propositions
 Logical connectives are used to represent and : , or , if-then: , not: , equality: IFF .
 Statements or sentences in the language are constructed from atomic propositions and logical
connectives.
 PQ “Ali likes chocolate and he doesn’t have any (Ali doesn’t have chocolate).”
 PQ “If Ali likes chocolatethen Ali has chocolate”.

 Propositional Logic Sentences


- Every propositional symbol and truth symbol is a sentence. E.g. P,Q
- The negation of a sentence is a sentence.
- The conjunction, or and, of two sentences is a sentence.
EXPERT SYSTEMS
 An expert system is also known as knowledge based system, is a computer program that contains some
of the subject specific knowledge of one or more human experts.
 It is uses Q/A, logical reasoning to get the solution of the problem.
 It is an interactive computer based decision tool that uses both facts and heuristics to solve difficult
problems based on knowledge acquired from an expert.
 An expert system operates as an interactive system that responds to questions, asks for clarification,
makes recommendations and generally aids the decision making process.

WHY DO WE NEED FOR EXPERT SYSTEMS?


i. We need expert systems because humans have limited working memory.
ii. Humans are slow in recalling information stored in the memory.
iii.Humans are unable to retain large amounts of data in memory.
iv. Humans lie, hide and die.
v. Expert systems are necessitated by limitations associated with conventional human decision making
process.
vi. We need expert systems because humans get tired from physical and mental workload.
FEATURES OF EXPERT SYSTEMS
1. An expert system reasons logically
2. Q/A based.
3. Conclusion based
4. Multiple result oriented
5. Specific knowledge rather than specific techniques

APPLICATION AREAS OF EXPERT SYSTEMS


1. Medical diagnosis
2. Equipment repair
3. Investment analysis
4. Production control and training
5. Vehicle routing
6. Contract Bidding
DEVELOPMENT ENVIRONMENT
STRUCTURE OF AN EXPERT SYSTEM (KNOWLEDGE ACQUISTION)
Consultation Environment (use)

EXPERT
USER
FACTS OF THE RECOMMENTDATION,
CASE EXPLANATION

USER INTERFACE
KNOWLEDGE
ENGINEER
EXPLANATION FACILITY

INFERENCE ENGINE

FACTS OF THE
CASE KNOWLEDGE ACQUISITION FACILITY
WORKING MEMORY
KNOWLEDGE BASE DOMAIN KNOWLEDGE (ELEMENTS OF KNOWLEDGE BASE)

COMPONENTS OF AN EXPERT SYSTEM


 Knowledge base is a collection of facts and ruleswhich describes all the knowledge about the problem
domain.
 Inference Engine: is the part of the system that chooses which facts and rules to apply whentrying to
solve users’query.
 User interface: is the part of the system which takes the user query in a readable form and passes it to
the inference engine. It then displays the result to the user.

KNOWLEDGE ACQUISITION, RERESENTATION AND REASONING IN EXPERT


SYSTEMS
Development of a real-time knowledge based system
 Expert systems are used to capture knowledge, expertise available for 24 hours a day
 Knowledge based engineers develop system by:
i. Knowledge elicitation
ii. Knowledge fusion
iii. Coding knowledge base
iv. Testing and evaluation of system

Knowledge Engineering
This is a process of acquiring knowledge from experts and building knowledge
base. This can be viewed in two perspectives namely; narrow and broad perspective.
o Narrow perspective:
Knowledge acquisition, representation, validation, inference and maintenance
1. Broad perspective:
Developing and maintaining of intelligent systems

KNOWLEDGE ENGINEERING PROCESS


1. Acquisition of knowledge which includes general knowledge or Metaknowledge from experts, books,
documents, files and sensors.
2. Knowledge representation which has to do with organization of knowledge
3. Knowledge validation and verification
4. Inference has to do with software design to pass statistical sample data to generalization.
5. Explanation and justification capabilities

KNOWLEDGE SOURCES OF
VALIDATION KNOWLEDGE (EXPERT,
(TEST CASES) OTHERS)

Encoding
KNOWLEDGE BASE KNOWLEDGE
REPRESENTION

EXPLANATION
JUSTIFICATION

INFERENCING
KNOWLEDGE SOURCES
1. Documented: viewed, written, sensory and behavior
2. Undocumented: memory
3. Acquired: human senses and machine

KNOWLEDGE CATEGORIES
1. Declarative: which has to do with descriptive representation of knowledge.
2. Procedural: has to do with how things work under different circumstances and how to use declarative
knowledge in solving problems
3. Meta Knowledge:

KNOWLEDGE ENGINEERS
1. These are professionals who elicit knowledge from experts.
 Wide range of understanding and capabilities.
 Empathetic and patient
2. Integrate knowledge from various sources
 Create and edit codes and operate tools
3. Build knowledge base
 Validate information and train users

EXPERT I KNOWLEDGE ENGINEERS’


ROLES IN INTERACTIVE
EXPERT II KNOWLEDGE ACQUISITION
KNOWLEDGE
ADVISE
ACQUISITION MANAGE
ACQUISITION

KNOWLEDGE EDIT
BASE

MANAGE

ENCDOING KNOWLEDGE
ENCODING EDIT ENGINEER

COMPUTER VALIDATE TRAIN


KNOWLEDGE BASE

CLIENT II
ES TOOLS

CLIENT I
ELICITATION METHODS
1. Manual methods: through interviews, track reasoning process and observation
2. Semi-automatic methods: build base with minimal help from knowledge engineer and allow the
execution of routine tasks with minimal expert input
3. Automatic methods: minimal input from both experts and knowledge engineers

VALIDATION AND VERIFICATION


These are dynamic activities in knowledge engineering process. Evaluation has to do with accessing
systems’ overall value.
Validation is concerned with comparing systems’ performance to experts including concordance and
differences.
Verification is concerned with building and implementing the system correctly.

A TABLE SHOWING THE ADVANTAGES AND DISADVANTAGES OF KNOWLEDGE


REPRESENTATION

SCHEME ADVANTAGES DISADVANTAGES



HARD TO FOLLOW
HIERARCHY
 INEFFICIENT FOR LARGE
 SIMPLE SYNTAX
SYSTEMS
 EASY TO UNDERSTAND
PRODUCTIO  NOT ALL KNOWLEDGE CAN
 SIMPLE INTERPRETER
N RULES BE EXPRESSED AS RULES
 HIGHLY MODULAR AND
AND
FLEXIBLE
 POOR AT REPRESENTING
STRUCTURED DESCRIPTIVE
KNOWLEDGE
 MEANINGS ATTACHED TO THE
 EASY TO FOLLOW HIERARCHY NODES MIGHT BE AMBIGUOUS
SEMANTIC
 EASY TO TRACE ASSOCIATION  EXCEPTION HANDLING IS
NETWORKS
AND FLEXIBLE DIFFICULT
 DIFFICULT TO PROGRAM
 EXPRESSIVE POWER
 EASY TO SET UP SLOTS FOR
NEW PROPERTIES AND
 DIFFICULT TO PROGRAM
RELATION
 DIFFICULT FOR INFERENCE
FRAMES  EASY TO CREATE SPECIALIZED
 LACK OF INEXPENSIVE
PROCEDURES
SOFTWARE
 EASY TO INCLUDE DEFAULT
INFORMATION AND DETECT
MISSING VALUES
 SEPARATION OF
 FACTS ASCERTAIN
REPRESTATION AND
INDEPENDENTLY OF USE
PROCESSING
FORMAL  ASSURANCE THAT ONLY
 INEFFICIENT WITH LARGE SETS
LOGIC VALID CONSEQUENCES ARE
OF DATA
ASCERTAIN
 VERY SLOW WITH LARGE
 COMPLETENESS
KNOWLEDGE BASE
Natural Language Processing (NLP) refers to AI method of communicating with an intelligent systems
using a natural language such as English. NLP can be defined as the automatic or semi-automatic
processing of human language.

Alternatively, pattern recognition is the science for observing the environment, learning to
distinguish patterns of interest from their background and making sound decision about the pattern or
pattern classes.
The application areas of Pattern Recognition are as follows:
 Optical Character Recognition (OCR) –
Handwritten: which has to do with sorting letters by poster.
Printed text: reading machines for blind people and digitalization of text
 Biometrics-
Face recognition, verification and retrieval
Fingerprint recognition
Speech recognition
 Diagnostics systems
a) Medical Diagnostics such as X-ray, EKG analysis
b) Machine Diagnostics
Military Application
Automated Target Recognition
Image Segmentation and Analysis (recognition from area or satellite photography)
 Data Mining
Organization and Retrieval of multimedia databases)
Document Classification

Diagram showing the components of Pattern Recognition System

PHYSICAL ENVIRONMENT

TRAINING DATA
DATA ACQUISITION/SENSING

PRE-PROCESSING
PRE-PROCESSING

FEATURE
FEATURE EXTRACTION EXTRACTION/SELECTION

FEATURES FEATURES

CLASSIFICATION MODEL
MODEL
LEARNING/ESTIMATION

POST-PROCESSING

DECISION

Data Acquisition
This has to do with measurement of physical variables considering issues such as bandwidth,
resolution, sensitivity, distortion
Pre-Processing
This has to do with removal of noise in data and isolation of patterns of interest from the background.

Feature Extraction
This has to do with extracting features which are good for the classification and finding a new
representation in terms of the features.

Classification
Using features and learned models to assign a pattern to a category

Post-processing
Evaluation of confidence in the decision, exploitation of context to improve performance and
combination of experts

Pattern Recognition Approaches are:


Statistical Approach: focuses on statistics of the pattern or based on the underlined statistical model
of patterns/pattern classes. Bayesian Approach

Syntactic/Structural Approach: Pattern classes, represented by mean of formal structure such as grammar,
automata and stream.
Neural Network Approach: Classifier is represented as a network of cells modelling neurons from a
human brain.
Application area of natural language processing are:
(i) Communication
(ii) Faster diagnosis.
(iii)Customer review
(iv)Virtual digital assistant.
Python is an open source oriented programming language mainly used for data science. Stack-
overflow calls it as the fastest growing programming language.
Reasons why Python is necessary in Artificial Intelligence are:
 Less code
 Prebuilt library
 Plat form dependent
 Massive support
 Ease of learning
Python Libraries and their Features
(i) Scikit: It is a python library associated with Numpy and Scipy. It is considered as one of the best
library for working with complex data.
Features
 Cross Validation
 Unsupervised learning algorithm
 Feature Extraction in images and text
(ii) Keras: These simplifies the implementation of neural network. It provides some of the best
utilities for combining models processing, datasets, visualization of graph etc.
Features
 Run smoothly on both CPU and GPU
 Support all types of neural network
 Complete Python based

(iii) Tensor Flow: It was developed by google in collaboration with brain tip. It is popularly used in
writing machine learning algorithms.
Features
 Responsive construct
 Flexibility
 Easily trainable
 Parallel neural network training

(iv) Numpy: This a Python library that is mainly used for computing scientific/ mathematical data.
Features
 Support multi-dimensional array
 Numerical Analysis
 Intuitive

The Machine Learning steps in python are


 Define Objectives
 Data Gathering
 Data Preparation
 Data Exploration
 Building a model
 Model Evaluation
 Prediction

PROLOG,
In Prolog, Facts are always true. Facts are unconditional statement which are assumed to be correct
at the time of use. Facts can also be called predicates. Facts are means of stating that a relationship
holds between objects (arguments).
(ii) Atoms are constants that do not have numerical values.
In prolog Rule is defined as what give prolog the ability to pursue its decision making process.
Rules extend the capability of a logic program. The simplest type of rule is called production rule
and it takes the form; IF <Condition> THEN <Conclusion>, the right side is the antecedent while
the left side is the consequence of the part.
(iv) Prolog is sent into action by giving it a goal, which we can think of for the moment just as a
simple command. Simple Prolog commands are formed by a name (the predicate name), followed by
brackets round the data item(s) involved (the arguments).
Basic facts
about PROLOG and main applications areas of Prolog
 Prolog is a high-level logic programming language (Programming in LOGic);
 Good at pattern matching (by unification) and searching;
 Not very good for repetitive number crunching;
 Excellent for language processing, rule-based expert systems, planning and other AI
applications;
 Uses depth-first search and backtracking to search for solutions automatically;
 Best written in little chunks (modular code): indeed this is assumed in its syntax;
 Uses a % to prefix comments or /* ... */ to surround them.

The application areas of PROLOG are:


 Natural Language Processing
 Compiler Construction
 Expert System Development
 Computer Algebra
 Game Developments
 Database systems
 Parallel Computers Architecture Developments

Techniques of knowledge representation


There are basically four ways of knowledge representation and these are given
as follows:

1. Logical Representation
2. Semantic Network Representation
3. Frame Representation
4. Production Rules

What to Represent:
The types of knowledge that must be represented in AI systems are as follows:

1.Logical Representation
A language with certain concrete principles that deals with propositions and has
no ambiguity in representation is referred to as logical representation. Drawing
a conclusion based on numerous criteria is referred to as logical representation.
Some important communication guidelines are laid out in this diagram. It's
made up of well-defined syntax and semantics that facilitate sound inference.
Each sentence could be translated into logics using the syntax and semantics.

Syntax:

 Syntaxes are the principles that govern how legal sentences are
constructed in logic.
 It determines the symbol we can use to express knowledge.
 What is the best way to write those symbols?

Semantics:

 The rules by which we can comprehend a phrase in logic are known as


semantics.
 Semantic also entails giving each statement a meaning.
 There are primarily two logics that can be used to represent logic:
o Propositional Logics
o Predicate logics

Advantages of logical representation:

 We can do logical reasoning with the help of logical representation.


 Programming languages are built on the foundation of logical
representation.

Advantages of logical representation:

 We can do logical reasoning with the help of logical representation.


 Programming languages are built on the foundation of logical
representation.

Disadvantages of logical Representation:

The various types of knowledge are as follows:

 Logical representations have some limitations and are difficult to use.


 It's possible that the logical representation technique isn't very natural,
and inference isn't particularly efficient.

Note: That logical representation and logical reasoning are not the
same thing; logical representation is a representation language, and
reasoning is a logical thinking process.

2. Semantic Network Representation


For knowledge representation, semantic networks are an alternative to
predicate logic. We can express our knowledge in Semantic Networks as
graphical networks. This network is made up of nodes that represent things and
arcs that describe their relationships. Semantic networks may classify objects in
a variety of ways and link them together.

This representation consists of basically two types of relations:

1. IS-A relation (Inheritance)


2. Kind-of-relation

Example: Some statements which we have to represent in the form of nodes


and arcs are as follows.

Statements:

 Jerry is a cat.
 Jerry is a mammal.
 Jerry is owned by Priya.
 Jerry is brown colored.
 All Mammals are animal.
We've used nodes and arcs to represent different types of knowledge in the
diagram above. Each object has some sort of relationship with another object.

Disadvantage in Semantic representation:

 Because we need to traverse the entire network tree to answer some


questions, semantic networks take longer to compute at runtime. In the
worst-case situation, we may discover that the answer does not exist in
this network after traversing the entire tree.
 Semantic networks attempt to replicate human-like memory (which has
1015 neurons and linkages) in order to store information, however in
actuality, such a large semantic network is impossible to construct.
 These types of representations are insufficient since they lack an
equivalent quantifier, such as all, some, none, and so on.
 The link names in semantic networks are not defined in any way.
 These networks aren't intelligent and rely on the system's inventor.

Advantages of Semantic network:

 Semantic networks are a natural way to represent information.


 Semantic networks are a transparent way of conveying meaning.
 These networks are straightforward and simple to comprehend.

3. Frame Representation

A frame is a record-like structure that contains a set of properties and their


values to describe a physical thing. Frames are a sort of artificial intelligence
data structure that splits knowledge into substructures by depicting stereotyped
situations. It is made up of a set of slots and slot values. These slots can come in
any shape or size. Facets are the names and values assigned to slots.
Facets: Facets are the numerous aspects of a slot machine. Facets are
characteristics of frames that allow us to constrain them. Example: When data
from a specific slot is required, IF-NEEDED facts are used. A frame can have any
number of slots, each of which can contain any number of facets, each of which
can have any number of values.

Semantic networks gave rise to frames, which later evolved into our modern-
day classes and objects. A single frame is of limited utility. A frames system is
made up of a group of interconnected frames. Knowledge about an object or
event can be kept in the knowledge base in the frame. The frame is a form of
technology that can be used in a wide range of applications.

Example: 1

Let's take an example of a frame for a book

Slots Filter
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition PThird Edition
Year 1996
Page 1152
Example: 2

Let's pretend we're dealing with an entity, Peter. Peter is a professional


engineer, and he is 25 years old. He lives in the city of London, in the country of
England. The frame representation for this is as follows:

Slots
Name Peter
Profession Doctor
Age 25
Marital Status Single
Year 1996
Weight 78
Advantages of frame representation:

 By grouping related facts, the frame knowledge representation makes


programming easier.
 Many AI applications employ the frame representation because it is rather
flexible.
 Adding slots for additional attributes and relations is a breeze.
 It's simple to add default data and look for missing variables.
 The frame representation is simple to grasp and visualize.

Disadvantages of frame representation:

 The inference mechanism in a frame system is difficult to process.


 Frame representation does not allow for a smooth progression of the
inference procedure.
 The approach to frame representation is rather broad
4. Production Rules
Production rules system consists of (condition, action) pairs which means, "If
condition then action". It has basically three parts:

 The set of production rules


 Working Memory
 The recognize-act-cycled

The agent in production rules checks for the condition, and if it exists, the
production rule fires and the appropriate action is taken. The rule's condition
component determines which rule can be used to solve an issue. The action
portion, on the other hand, is responsible for carrying out the corresponding
problem-solving actions. A recognize-act cycle is the name given to the entire
procedure.

Working memory stores a description of the present state of problem-solving,


and rules can be used to write knowledge to it. Other rules may be triggered by
this knowledge.

If a new scenario (state) arises, numerous production rules will be fired at the
same time, which is known as a conflict set. In this case, the agent must choose
a rule from among these sets, and it is called a 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.

Advantages of Production rule:

1. The production rules are written in plain English.


2. We can quickly delete, add, or modify an individual rule because the
production rules are relatively modular

Disadvantages of Production rule:

1. The production rule system has no learning capabilities because it does


not save the solution to the problem for future use.
2. Many rules may be active during the execution of the program, making
rule-based production systems inefficient.

You might also like