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

CSC413 LECTURE NOTE

Cyber security, created by me , for cyber security and computer science students

Uploaded by

iamjoelaemmanuel
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)
7 views

CSC413 LECTURE NOTE

Cyber security, created by me , for cyber security and computer science students

Uploaded by

iamjoelaemmanuel
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/ 32

CSC413

ARTIFICIAL INTELLIGENCE & EXPERT SYSTEM


Course Contents
Overview of Artificial Intelligence. History of AI. Goals of AI. AI Technique. Types of AI.
Branches and applications of AI. Advantages and Disadvantages. Introduction to Intelligent
Agents. Agent Performance, Examples of Agents, Agent Faculties, Rationality, Agent
Environment. Agent Architectures. Search. General Classes of AI Search Algorithm Problems.
Problem Solving by Search. Types of AI Search Techniques and Strategies. Introduction to the
types of problems and techniques in AI. Problem-Solving methods. Major structures used in AI
programmes. Knowledge Representation. KR and Reasoning Challenges. KR Languages.
Knowledge representation techniques such as predicate logic, non-monotonic logic, and
probabilistic reasoning. Semantic Network - types of relationships, semantic network inheritance,
types and components. Introduction to Frames. Natural Language Processing (NLP). Introduction
to natural language understanding and various syntactic and semantic structures. Introduction to
Expert Systems - characteristics, components, types, requirements, technology, development.
Programming Languages for AI. Introduction to computer image recognition

OVERVIEW OF ARTIFICIAL INTELLIGENCE


Artificial intelligence (AI) enables machines to think and solve complicated problems
similarly to humans.

For instance, we do a task, make mistakes, and learn from them (at least the wise ones do!).
Artificial intelligence (AI) is designed to solve problems make mistakes and learn from them to
improve itself. Likewise, an AI or Artificial Intelligence is supposed to work on a problem, make
some mistakes in solving the problem and learn from the problems in a self-correcting manner as a
part of its self-improvement.

The concept of artificial intelligence is not as modern as we believe. This goes back as far as 1950,
when Alan Turing developed the Turing test. The Turing Test is a method of investigation in
artificial intelligence (AI) that determines whether or not a computer can think like a person. If a
machine can engage in a conversation with a human without being detected as a machine, it has
demonstrated human intelligence.

The first chatbot computer programme, at its most basic, a chatbot is a computer programme that
simulates and processes human interaction (whether written or spoken), allowing humans to
communicate with digital gadgets as if they were speaking with a real person. It was named
ELIZA, which was developed in the 1960s.

IBM Deep Blue, a chess computer developed in 1977, defeated a world chess champion in two of
six games, one of which the champion won and the other three were drawn. Deep Blue was a
Page 1 of 32
chess-playing expert system that ran on a specially designed IBM supercomputer. It was the first
computer to win a game and a match against a reigning world champion using standard time
restrictions.

Siri, Apple's digital assistant, was announced in 2011. Siri enables users to make calls, send texts,
use apps, and do tasks just by speaking. And Siri is the most personal intelligent helper. It is an
easy way to make calls, send texts, use apps, and get things done with just your voice. And Siri is
the most private intelligent assistant.

Elon Musk and a few others created OpenAI in December 2015. OpenAI is a U.S. based artificial
intelligence research organization, researching artificial intelligence with the goal of developing
"safe and beneficial" artificial general

The GOALS of AI: The two vital goals of Artificial Intelligence are

 To create Expert Systems


 To implement Human Intelligence in Machines or Computer Systems

COMPONENTS OF AI
AI has four main components
1. Expert systems:
2. Heuristic problem solving
3. Natural Language Processing
4. Vision

While Expert system handles the situation as an expert and gives performance. It is an
application-specific systems that rely on obtaining the knowledge of human experts in an area and
programming that knowledge into a system. Examples are
(A) DIAGNOSTIC SYSTEMS- MYCIN system for diagnosing bacterial infections of the
blood and suggesting treatments. Intellipath pathology diagnosis system (AMA
approved). Pathfinder medical diagnosis system, which suggests tests and makes
diagnoses. Whirlpool customer assistance center.

(B) FINANCIAL DECISION MAKING- Credit card companies, mortgage companies,


banks, and the U.S. government employ AI systems to detect fraud and expedite
financial transactions.

(C) CLASSIFICATION SYSTEMS- Put information into one of a fixed set of categories
using several sources of information. E.g., financial decision-making systems.

Heuristic problem solving is meant to evaluate small range of solutions, may involve some
guesswork to find near optimal solution.

Page 2 of 32
Natural language processing provides communication between human and machine in natural
language.
Vision is the ability to recognize shapes and features etc. automatically. For instance, Face
recognition programs in use by banks, government, etc. The ALVINN system from CMU
autonomously drove a van from Washington, D.C. to San Diego.

Application of AI:
AI algorithms have attracted close attention of researchers and have also been applied
successfully to solve problems in engineering. Nevertheless, for large and complex
problems, AI algorithms consume considerable computation time due to stochastic feature
of the search approaches
1) Business, financial strategies
2) Engineering: check design, offer suggestions to create new product, expert
systems for all engineering problems
3) Manufacturing: assembly, inspection and maintenance
4) Medicine: monitoring, diagnosing
5) Education: in teaching
6) Fraud detection
7) Object identification
8) Information retrieval
9) Space shuttle scheduling

Building AI Systems:
Artificial Intelligence is built from three cardinal points. (Perception, Reasoning and Action)

1) Perception
Intelligent biological systems are physically embodied in the expert system (world) and
experience the world through their sensors (senses). For an autonomous vehicle, input
might be images from a camera and range information from a rangefinder. For a medical
diagnosis system, perception is the set of symptoms and test results that have been obtained
and input to the system manually.

2) Reasoning
Inference, decision-making, classification from what is sensed and what the internal
"model" is of the world. Might be a neural network, logical deduction system, Hidden
Markov Model induction, heuristic searching a problem space, Bayes Network inference,
genetic algorithms, etc. Includes areas of knowledge representation, problem solving,
decision theory, planning, game theory, machine learning, uncertainty reasoning, etc.

3) Action
Biological systems interact within their environment by actuation, speech, etc. All behavior
is centered around actions in the world. Examples include controlling the steering of a Mars

Page 3 of 32
rover or autonomous vehicle or suggesting tests and making diagnoses for a medical
diagnosis system. Includes areas of robot actuation, natural language generation, and
speech synthesis.

EXPERT SYSTEM –
An expert system is a machine system in which useful human knowledge is added in
machine memory in order to give intelligent advice and offer explanations and justifications of its
decisions or demand. Expert systems rely on a large database of well-defined specialized
knowledge about a particular area. Construction of such programs is referred to as Knowledge
Engineering. All such AI programs that achieve expert-level competence in solving problems in
task areas by using knowledge about specific tasks are called knowledge-based Systems or expert
systems. These programs contain the knowledge used by human experts, in contrast to knowledge
gathered from textbooks. Because of these expert systems are like human experts e.g., doctors,
engineers, analysts, teachers, geologists etc. which encapsulate the skills of an expert and to
dispense advice to less knowledgeable users. This transfer of knowledge depends upon the task
and will take place gradually through many interactions between expert and the system.

Expert tasks: some of the tasks executed by an expert system include: -


1. Medical diagnosis.
2. Mathematical problem solving
3. Playing games like chess

These tasks cannot be done by all people and can only be performed by skilled specialists. Clearly
tasks of the first type are easy for humans to perform, and almost all are able to master them. The
second range of tasks requires skill development and/or intelligence and only some specialists can
perform them well. However, when we look at what computer systems have been able to achieve
to date, we see that their achievements include performing sophisticated tasks like medical
diagnosis, performing symbolic integration, proving theorems, and playing chess.

Agent:
An Agent is anything that can be viewed as perceiving its environment through
sensors and acting upon that environment through actuators. Actuators are the physical
tools used by agents.
 A human agent has eyes, ears, and other organs for sensors and hands, legs,
mouth, and other body parts for actuators.
 A robotic agent might have cameras and infrared range finders for sensors and
various motors for actuators.
 A software agent receives keystrokes, file contents, and network packets as
sensory inputs and acts on the environment by displaying on the screen, writing
files, and sending network packets.

Page 4 of 32
Intelligent Agents
 An “agent” is anything that can be viewed as perceiving its environment through
sensors and acting upon that environment through actuators.
 Percept refers to the agent’s perceptual inputs at a given time instant.
 An agent’s perceptual sequence is the complete history of everything the agent has
ever perceived.
 In general, an agent’s choice of action at any given instant can depend on the entire
precept sequence observed to date, but not on anything it hasn’t perceived.
 Agent function: It is a map from the precept sequence to an action.

Structure of an Agents and its environments

Agents include humans, robots, softbots, thermostats, etc. The agent function maps from percept
histories to actions:
¿
f :P → A

The agent program runs on the physical architecture to produce f .

A rational agent is one that “does the right thing”,

It is advisable to design performance measures according to what one actually wants in the
environment, as opposed to how one believes that agent should behave.

Rationality
What is rational at any given time depends on (at least) four things:
(1) The performance measure
(2) The agent’s prior knowledge
(3) The actions the agents can perform
(4) The agent’s percept sequence to date.

Page 5 of 32
What is a rational agent: A rational agent should choose an action that is likely to maximize its
performance measure based on the data offered by the percept sequence and any built-in
information the agent knows. Percepts may not necessarily supply all relevant information.
An ideal rational agent is the one, which is capable of doing expected actions to maximize its
performance measure, on the basis of:
 Its percept sequence
 Its built-in knowledge base
Rationality of an agent depends on the following:
1. The performance measures, which determine the degree of success.
2. Agent’s Percept Sequence till now.
3. The agent’s prior knowledge about the environment.
4. The actions that the agent can carry out.
A rational agent always performs right action, where the right action means the action that
causes the agent to be most successful in the given percept sequence. The problem the agent solves
is characterized by Performance Measure, Environment, Actuators, and Sensors (PEAS).
An intelligent agent should not only gather information, but also learn. The agent’s initial
configuration could reflect some prior knowledge of the environment, but as the agent gains
experience, this may be modified and augmented (an extreme case is when the environment is
known a priori). Generally speaking, a rational agent should be autonomous, in the sense that it
learns what it can to compensate for partial or incorrect prior knowledge. After sufficient
experience of its environment, the behavior of a rational agent can become effectively independent
of its prior knowledge. Ideally, the incorporation of learning allows for the design of a single
rational agent that will succeed in a variety of different environments and for a variety of tasks (the
goal of AGI).
An artificial general intelligence (AGI) is a type of artificial intelligence (AI) that can perform as
well as or better than humans on a variety of cognitive issues. To design a rational agent, we need
to specify the task environment known as PEAS.
o Performance measure
o Environment
o Actuators
o Sensors
The task of designing an automated taxi involves: -
Agent- automated taxi
Performance measure- safety, destination, profits, legality, comfort, ...

Page 6 of 32
Environment- CUSTECH streets/freeways, traffic, pedestrians, weather, ...
Actuators- steering, accelerator, brake, horn, speaker/display, ...
Sensors- video, accelerometers, gauges, engine sensors, keyboard, GPS (global positioning
system), The Global Positioning System (GPS) is a U.S.-owned utility that provides users
with positioning, navigation, and timing (PNT) services. This system consists of three
segments: the space segment, the control segment, and the user segment.
Similarly, for a medical expert system,
Agent: Medical diagnosis system
Performance measure: Healthy patient, minimize costs, lawsuits
Environment: Patient, hospital, staff
Actuators: Screen display (questions, tests, diagnoses, treatments, referrals)
Sensors: Keyboard (entry of symptoms, findings, patient's answers)

STRUCTURE OF INTELLIGENT AGENTS


Agent’s structure can be viewed as:
• Agent = Architecture + Agent Program
• Architecture = the machinery that an agent executes on.
• Agent Program = an implementation of an agent function.
Four basic types in order of increasing generality:
o Simple reflex Agents
 They choose actions only based on the current percept.
 They are rational only if a correct decision is made only on the basis
of current precept.
 Their environment is completely observable.
o Model-Based Reflex Agents
They use a model of the world to choose their actions.
They maintain an internal state.
Model: knowledge about “how the things happen in the world”.
Internal State: It is a representation of unobserved aspects of current state
depending on percept history.
Updating state requires the information about
 How the world evolves.
 How the agent’s actions affect the world

Page 7 of 32
o Goal-based agents
They choose their actions in order to achieve goals. Goal-based approach is
more flexible than reflex agent since the knowledge supporting a decision is
explicitly modeled, thereby allowing for modifications.
Goal: It is the description of desirable situations.

o Utility-based agents
They choose actions based on a preference (utility) for each state.
Goals are inadequate when iff:
 There are conflicting goals only some of which can be achieved.
 Goals have some uncertainty of being achieved and one needs to
weigh likelihood of success against the importance of a goal.
All these can be turned into learning agents

The Nature of Environments


Some programs operate in the entirely artificial environment confined to keyboard input, database,
computer file systems and character output on a screen.
In contrast, some software agents (software robots or softbots) exist in rich, unlimited softbots
domains. The simulator has a very detailed, complex environment. The software agent needs to
choose from a long array of actions in real time. A softbot designed to scan the online preferences
of the customer and show interesting items to the customer works in the real as well as an
artificial environment.
The most famous artificial environment is the Turing Test environment, in which one real and
other artificial agents are tested on equal ground. This is a very challenging environment as it is
highly difficult for a software agent to perform as well as a human.

Note: A softbot (software robot) is a programme that interacts with a software environment by
issuing commands and interpreting its responses or interpreting the environment’s feedback.
Turing Test
The success of an intelligent behavior of a system can be measured with Turing Test.
Two persons and a machine to be evaluated participate in the test. Out of the two persons, one
plays the role of the tester. Each of them sits in different rooms. The tester is unaware of who is
machine and who is a human. He interrogates the questions by typing and sending them to both
intelligences, to which he receives typed responses.
This test aims at fooling the tester. If the tester fails to determine machine’s response from the
human response, then the machine is said to be intelligent.

Page 8 of 32
Environment types/Properties
The environment has multifold properties:
 Discrete / Continuous: If there are a limited number of distinct, clearly defined,
states of the environment, the environment is discrete (For example, chess);
otherwise, it is continuous (For example, driving).
 Observable / Partially Observable: If it is possible to determine the complete
state of the environment at each time point from the percepts it is observable;
otherwise, it is only partially observable.
 Static / Dynamic: If the environment does not change while an agent is acting, then
it is static; otherwise, it is dynamic.
 Single agent / Multiple agents: The environment may contain other agents which
may be of the same or different kind as that of the agent.
 Accessible vs. inaccessible: If the agent’s sensory apparatus can have access to the
complete state of the environment, then the environment is accessible to that agent.
 Deterministic vs. Non-deterministic: If the next state of the environment is
completely determined by the current state and the actions of the agent, then the
environment is deterministic; otherwise, it is non-deterministic.
 Episodic vs. Non-episodic: In an episodic environment, each episode consists of
the agent perceiving and then acting. The quality of its action depends just on the
episode itself. Subsequent episodes do not depend on the actions in the previous
episodes. Episodic environments are much simpler because the agent does not need
to think ahead
Quiz 001
What is the difference between expert system and intelligent agent?
AI involves the use of methods based on the intelligent behavior of humans to solve complex
problems. Experts systems are computer programs designed to solve complex decision problems

Page 9 of 32
ALGORITHMS
What are algorithms?
An algorithm is a well-defined finite set of rules that specifies a sequential series of
elementary operations to be applied to some data called the input, producing after a finite amount
of time some data called the output. An algorithm solves some computational problem. Algorithms
(along with data structures) are the fundamental “building blocks” from which programs are
constructed. Only by fully understanding them is it possible to write very effective programs.
Therefore, algorithms are the ideas behind computer programs. To be interesting, an algorithm has
to solve a general, specified problem. An algorithmic problem is specified by describing the set of
instances it must work on, and what desired properties the output must have.

Definition of Algorithm
o An algorithm is a set of rules for carrying out calculation either by hand or on a
machine.
o An algorithm is a sequence of computational steps that transform the input into the
output.
o An algorithm is a sequence of operations performed on data that have to be
organized in the data structures.
o A finite set of instruction that specify a sequence of operations to be carried out in
order to solve a specific problem or class of problems is called an algorithm.
o An algorithm is an abstraction of a program to be executed on a physical machine
(model computation).
o An algorithm is defined as set of instructions to perform a specific task within finite
no. of steps.
o Algorithm is defined as a step by step procedure to perform a specific task within
finite number of steps.
o It can be defined as a sequence of definite and effective instructions, while
terminates with the production of correct output from the given input.
CHARACTERISTICS OF AN ALGORITHM
Every algorithm should have the following characteristics/features:
a) Input
An algorithm may have one or more inputs. The inputs are taken from a specified
set of subjects. The input pattern may be texts, images or any type of files.
b) Output
An algorithm may have one or more outputs. Output is basically a quantity which
has a specified relation with the input.

Page 10 of 32
c) Finiteness
An algorithm should terminate after a countable number of steps. In some cases the
repetition of steps may be larger in number. If a procedure is able to resolve in finite
number of execution of steps, then it is referred to be computational method.
d) Definiteness
Each step of an algorithm must be precisely defined. The action to be carried out
must be on ambiguously specified for each case. Due to the lack of
understandability, one may think that the step might be lacking definiteness.
Therefore, in such cases mathematically expressions are written, so that it resembles
the instruction of any computer language.
e) Effectiveness
An algorithm is generally expected to effective. Means the steps should be
sufficiently basic, so that it may be possible for a man to resolve them.
f) Precision
The steps are precisely stated.
g) Determination
The intermediate results of each step of execution are unique and are determined
only by input and output of the preceding steps.
h) Correctness
Output produced by the algorithm should correct.
i) Generality
Algorithm applies to set of standard inputs.

SEARCH ALGORITHMS
Searching is the universal technique of problem solving in AI. There are some single-player games
such as tile games, Sudoku, crossword, etc. The search algorithms help you to search for a
particular position in such games.
Search Terminology
Problem Space: It is the environment in which the search takes place. (A set of states and set of
operators to change those states)
Problem Instance: It is Initial state + Goal state
Problem Space Graph: It represents problem state. States are shown by nodes and operators are
shown by edges.
Depth of a problem: Length of a shortest path or shortest sequence of operators from Initial State
to goal state.
Space Complexity: The maximum number of nodes that are stored in memory.
Time Complexity: The maximum number of nodes that are created.

Page 11 of 32
Admissibility: A property of an algorithm to always find an optimal solution.
Branching Factor: The average number of child nodes in the problem space graph.
Depth: Length of the shortest path from initial state to goal state.

Type of search operation


Breadth-First Search- It starts from the root node, explores the neighboring nodes first
and moves towards the next level neighbors. It generates one tree at a time until the solution is
found. It can be implemented using FIFO queue data structure. This method provides shortest path
to the solution.
If branching factor (average number of child nodes for a given node) = b and depth = d,
then number of nodes at level d = b d. The total no of nodes created in worst case is b + b 2 + b3 + …
+ bd.
Disadvantage: Since each level of nodes is saved for creating next one, it consumes a lot
of memory space. Space requirement to store nodes is exponential. Its complexity depends on the
number of nodes. It can check duplicate nodes.

1 2

3 4 5 6

Depth-First Search- It is implemented in recursion with LIFO stack data structure. It


creates the same set of nodes as Breadth-First method, only in the different order. As the nodes on
the single path are stored in each iteration from root to leaf node, the space requirement to store
nodes is linear. With branching factor b and depth as m, the storage space is bm.
Disadvantage: This algorithm may not terminate and go on infinitely on one path. The
solution to this issue is to choose a cut-off depth. If the ideal cut-off is δ , and if chosen cut-off is
lesser than δ , then this algorithm may fail. If chosen cut-off is more than δ , then execution time
increases. Its complexity depends on the number of paths. It cannot check duplicate nodes
Bidirectional Search- It searches forward from initial state and backward from goal state
till both meet to identify a common state. The path from initial state is concatenated with the
inverse path from the goal state. Each search is done only up to half of the total path.

Page 12 of 32
Uniform Cost Search- Sorting is done in increasing cost of the path to a node. It always
expands the least cost node. It is identical to Breadth First search if each transition has the same
cost. It explores paths in the increasing order of cost.
Heuristic Searches
A heuristic search is a type of search procedure used to solve problems. It entails utilizing
previously existing information to reduce the quantity of searching required for an ideal result. In
this fashion the search “wanders” around the state-space graph, but again it will inevitably end up
in a local minimum or local maximum from which there is no escape. Algorithms that either give
nearly the right answer or provide a solution not for all instances of the problem are called
heuristic algorithms. This group includes a plentiful spectrum of methods based on traditional
techniques as well as specific ones. Some notable examples of this search technique are: -
Hill Climbing Algorithm
We will assume we are trying to maximize a function. That is, we are trying to find a point
in the search space that is better than all the others. And by "better" we mean that the evaluation is
higher. We might also say that the solution is of better quality than all the others. The idea behind
hill climbing is as follows.
1. Pick a random point in the search space.
2. Consider all the neighbors of the current state.
3. Choose the neighbor with the best quality and move to that state.
4. Repeat 2 thru 4 until all the neighboring states are of lower quality.
5. Return the current state as the solution state.
Simulated annealing algorithm- Uses an approach similar to hill-climbing, but
occasionally accepts solutions that are worse than the current. The probability of such acceptance
is decreasing with time.
Tabu search- Extends the idea to avoid local optima by using memory structures. The
problem of simulated annealing is that after ” jump” the algorithm can simply repeat its own track.
Tabu prohibits the repetition of moves that have been made recently.
Swarm intelligence was introduced in 1989. It is an artificial intelligence technique, based
on the study of collective behavior in decentralized, self-organized, systems. Two of the most
successful types of this approach are Ant Colony Optimization (ACO) and Particle Swarm
Optimization (PSO). In ACO artificial ants build solutions by moving on the problem graph and
changing it in such a way that future ants can build better solutions. PSO deals with problems in
which a best solution can be represented as a point or surface in an n-dimensional space. The main
advantage of swarm intelligence techniques is that they are impressively resistant to the local
optima problem.

Page 13 of 32
META-HEURISTIC ALGORITHMS
In computer science, meta-heuristic designates a computational method that optimizes a problem
by iteratively trying to improve a candidate solution with regard to a given measure of quality.
Meta-heuristics make few or no assumptions about the problem being optimized and can search
very large spaces of candidate solutions. However, meta-heuristics do not guarantee an optimal
solution is ever found. Many meta-heuristics implement some form of stochastic optimization.
Following are properties that characterize most meta-heuristics:
 Meta-heuristics are strategies that guide the search process. The goal is to efficiently
explore the search space in order to find near–optimal solutions.
 Techniques which constitute meta-heuristic algorithms range from simple local search
procedures to complex learning processes.
 Meta-heuristic algorithms are approximate and usually non-deterministic.
 Meta-heuristics are not problem - specific.

Properties of Search Algorithms –


Whichever search algorithm one use will generally depend on the problem domain. There
are four important factors to consider:
1. Completeness – Is a solution guaranteed to be found if at least one solution exists?
2. Optimality – Is the solution found guaranteed to be the best (or lowest cost) solution if
there exists more than one solution?
3. Time Complexity – The upper bound on the time required to find a solution, as a
function of the complexity of the problem.
4. Space Complexity – The upper bound on the storage space (memory) required at any
point during the search, as a function of the complexity of the
problem.

Page 14 of 32
Types of Search Algorithms in AI Techniques
Search algorithms are one of the essential elements of AI because they
are so important for information retrieval. These algorithms are made to
efficiently search through enormous volumes of data and present the
user with pertinent results. Examples are Breadth-First Search (BFS),
Genetic Algorithms, Depth-First search (DFS) etc.,

How search algorithms work in artificial intelligence


Artificial intelligence (AI) search algorithms use a logical process to locate the required data. Here
is how they usually work:
 Define the search space: Create a model of potential states so they can be explored.
 Start from the first state: Start your search from the first state you can find in the search
space.
 Explore neighboring states: Examine surrounding states using guidelines or heuristics to
assess their significance based on standards like resemblance.
 Move towards goal state: Iteratively advance toward the objective state by employing
strategies like backtracking or prioritization.
 Evaluate and improve: To increase accuracy and efficiency, continuously monitor
progress, and modify relevant criteria, heuristics, or user preferences.
 Reach the goal state: Stop searching after you've located the desired data or the best
match, which satisfies the set goal criteria.
 Performance optimization: To minimize computational resources & retrieval time,
optimize algorithms using methods like pruning, heuristic optimization, or parallelization.

Advantages of search algorithms in AI


 An approach that is methodical and well-organized: Search algorithms offer a
structured way of quickly looking through enormous volumes of data, ensuring a
methodical retrieval procedure.
 Effective and precise retrieval: These algorithms make it possible to identify pertinent
information quickly, enhancing the effectiveness and precision of information retrieval.
 Handling complex search spaces: Search algorithms have the ability to handle complex
search spaces, which enables them to travel through complex data structures or issue
domains.
 Adaptability to different challenges: Search algorithms are flexible and adaptable in
numerous AI disciplines since they may be used to solve different kinds of problems.

Page 15 of 32
AI search algorithm limitations
 Performance problems with overly large or complex search spaces: When the search
space is too big or complicated, search algorithms may run into performance problems,
which might slow down retrieval or demand more computation.
 Dependence on heuristics and input data quality: The effectiveness of the search results
is significantly influenced by the precision of the used heuristics and the input data quality.
The performance of search algorithms might be impacted by inaccurate or lacking data.
 Non-guarantee of optimal solutions: In dynamic or incomplete search spaces, where the
best solution might not be recognizable within the current limitations, search algorithms
may not always guarantee finding the optimal solution.

Applications of search algorithms in AI


Applications for search algorithms can be found throughout several AI fields, including:
 Natural language processing: Search algorithms are used for information extraction,
query resolution, sentiment analysis, and other language processing tasks in natural
language using AI.
 Image recognition: These algorithms help in the search for pertinent photos using user
queries or matching visual cues.
 Recommendation systems: Search engines make personalized suggestions possible by
matching user preferences with products that are appropriate.
 Robotics: To ensure effective exploration and effective mobility, search algorithms are
essential to robot path planning and navigation.
 Data mining: These methods make it easier to do tasks like grouping, classification, &
anomaly detection by extracting useful insights and patterns from vast datasets.

Improving information retrieval with search algorithms


Think about the following concepts to improve information retrieval using search algorithms:
 Algorithm selection: Carefully select the best algorithm based on the current issue and the
resources at hand. Making wise decisions requires an understanding of the traits and
constraints of various algorithms.
 Parallel computing: Utilizing parallel computing techniques, you can enhance the search
process. The retrieval process can be sped up and more effectively handled by spreading
the task across several processors or machines.
 Refining heuristics: Heuristics can be improved by tweaking the search engine's heuristics
in order to increase precision and efficiency. Heuristics can be modified in accordance with
the knowledge base and problem domain to improve retrieval.

Best Practices of Search Algorithms in AI


AI search algorithm best practices include:

Page 16 of 32
 Problem understanding: Gaining an in-depth knowledge of the problem's needs will help
you choose an algorithm.
 Algorithm selection: Select the best algorithm depending on the features of the problem
and variables like efficiency, accuracy, scalability, & cost.
 Heuristic design: Create efficient heuristics to efficiently direct the search process towards
the intended outcome.
 Techniques for performance optimization: Examine methods like parallel computing,
memory-efficient data structures, and pruning.
 Evaluation and iteration: Constantly assess and enhance the performance of the algorithm
through feedback analysis and incremental advancements.
 Think about trade-offs and restrictions: To improve the performance of the algorithm,
take into consideration constraints, resource limits, and user preferences.
 Testing and validation: Use relevant datasets and real-world examples to thoroughly test
and validate the method.

Importance of Search Algorithms in Artificial Intelligence


The following points explain how and why the search algorithms in AI are important:

 Solving problems: Using logical search mechanisms, including problem description,


actions, and search space, search algorithms in artificial intelligence improve problem-
solving. Applications for route planning, like Google Maps, are one real-world illustration
of how search algorithms in AI are utilized to solve problems. These programs employ
search algorithms to determine the quickest or shortest path between two locations.
 Search programming: Many AI activities can be coded in terms of searching, which
improves the formulation of a given problem's solution.
 Goal-based agents: Goal-based agents' efficiency is improved through search algorithms
in artificial intelligence. These agents look for the most optimal course of action that can
offer the finest resolution to an issue to solve it.
 Support production systems: Search algorithms in artificial intelligence help production
systems run. These systems help AI applications by using rules and methods for putting
them into practice. Production systems use search algorithms in artificial intelligence to
find the rules that can lead to the required action.
 Neural network systems: The neural network systems also use these algorithms. These
computing systems comprise a hidden layer, an input layer, an output layer, and coupled
nodes. Neural networks are used to execute many tasks in artificial intelligence. For
example, the search for connection weights that will result in the required input-output
mapping is improved by search algorithms in AI.

Properties of Search Algorithms


The four important properties of search algorithms in artificial intelligence for comparing their
efficiency are as follows:

Page 17 of 32
1. Completeness - A search algorithm is said to be complete if it guarantees to yield a
solution for any random input if at least one solution exists.
2. Optimality - A solution discovered for an algorithm is considered optimal if it is assumed
to be the best solution (lowest path cost) among all other solutions.
3. Time complexity - It measures how long an algorithm takes to complete its job.
4. Space Complexity - The maximum storage space required during the search, as
determined by the problem's complexity.

These characteristics often contrast the effectiveness of various search algorithms in artificial
intelligence.

Search Algorithm Terminologies

1. Search - Searching solves a search issue in a given space step by step. Three major factors
can influence a search issue.

 Search Space - A search space is a collection of potential solutions a system may have.
 Start State - The jurisdiction where the agent starts the search.
 Goal test - A function that examines the current state and returns whether or not the
goal state has been attained.

2. Search tree - A Search tree is a tree representation of a search issue. The node at the root
of the search tree corresponds to the initial condition.
3. Actions - It describes all the steps, activities, or operations accessible to the agent.
4. Transition model - It can be used to convey a description of what each action does.
5. Path Cost - It is a function that gives a cost to each path.
6. Solution - An action sequence connects the start node to the target node.

Optimal Solution - If a solution has the lowest cost among all solutions, it is said to be the optimal
answer.

Page 18 of 32
Expert Systems
ES are one of the prominent research domains of AI. It is introduced by the researchers at Stanford
University, Computer Science Department.
What are Expert Systems?
Various definitions of expert systems have been offered by several authors:
 An expert system belongs to a field of artificial intelligence, and it is a computer program that
simulates the judgment and behavior of an individual that has expert knowledge and experience in
a particular field. It is a knowledge-based computer program that exhibits a degree of expertise in a
particular domain thereby solving problem or making decisions that is comparable to that of a
human expert.
 It could also be referred to as an AI programs that achieve expert-level competence in solving
problems in task areas by bringing to bear a body of knowledge about specific tasks. It could be
referred to as knowledge-based or expert systems
 A type of application program that makes decisions or solves problems in a particular field by
using knowledge and analytical rules defined by experts in the field.
 Expert systems represent a branch of artificial intelligence, aiming to take the experience of
human specialists and to transfer to a computer system. Specialty knowledge is stored in the
computer, which by an execution system (inference engine) is reasoning and it derives specific
conclusions for the problem.
 A computer program that uses knowledge and reasoning techniques to solve problems that
normally require the abilities of human experts. Software that applies human-like reasoning
involving rules and heuristics to solve a problem.
An Expert System (EPS) is a software system, which finds solutions on the basis of expert
knowledge or provides an evaluation of known problems. Examples are systems for the support of
medical diagnosis or for the analysis of scientific data.
The expert systems are the computer applications developed to solve complex problems in
a particular domain, at the level of extra-ordinary human intelligence and expertise.
Characteristics of Expert Systems
High performance
Understandable
Reliable
Highly responsive
Page 19 of 32
Capabilities of Expert Systems
The expert systems are capable of –
Advising
Instructing and assisting human in decision making
Demonstrating Deriving a solution
Diagnosing
Explaining
Interpreting input
Predicting results
Justifying the conclusion
Suggesting alternative options to a problem
They are incapable of –
 Substituting human decision makers
 Possessing human capabilities
 Producing accurate output for inadequate knowledge base
 Refining their own knowledge

Page 20 of 32
Components of Expert Systems / Architect of an Expert System
The components of ES include –
 Knowledge Base
 Interface Engine
 User Interface

KNOWLEDGE
Let us see them one by one briefly BASE

INTERFACE
ENGINE
HUMAN KNOWLEDGE
EXPERT ENGINEER

USER
INTERFACE

USER
(May not necessarily be an Expert)

Knowledge Base
It contains domain-specific and high-quality knowledge. Knowledge is required to exhibit
intelligence. The success of any ES majorly depends upon the collection of highly accurate and
precise knowledge.
What is Knowledge?
The data is collection of facts. The information is organized as data and facts about
the task domain. Data, information, and past experience combined together are
termed as knowledge.
Components of Knowledge Base
The knowledge base of an ES is a store of both, factual and heuristic knowledge.
Factual Knowledge − It is the information widely accepted by the Knowledge
Engineers and scholars in the task domain.
Heuristic Knowledge − It is about practice, accurate judgement, one’s ability of
evaluation, and guessing.
Knowledge representation
It is the method used to organize and formalize the knowledge in the knowledge
base. It is in the form of IT-THEN-ELSE rules.
Knowledge Acquisition
Page 21 of 32
The success of any expert system majorly depends on the quality, completeness,
and accuracy of the information stored in the knowledge base. The knowledge base
is formed by readings from various experts, scholars, and the Knowledge
Engineers. The knowledge engineer is a person with the qualities of empathy, quick
learning, and case analyzing skills. He acquires information from subject expert by
recording, interviewing, and observing him at work, etc. He then categorizes and
organizes the information in a meaningful way, in the form of IF-THEN-ELSE
rules, to be used by interference machine. The knowledge engineer also monitors
the development of the ES.

Interface Engine
Use of efficient procedures and rules by the Interface Engine is essential in deducting a
correct, flawless solution. In case of knowledge-based ES, the Interface Engine acquires and
manipulates the knowledge from the knowledge base to arrive at a particular solution.

In case of rule based ES, it –


 Applies rules repeatedly to the facts, which are obtained from earlier rule
application.
 Adds new knowledge into the knowledge base if required.
 Resolves rules conflict when multiple rules are applicable to a particular case.

To recommend a solution, the interface engine uses the following strategies –


 Forward Chaining
 Backward Chaining

 Forward Chaining
It is a strategy of an expert system to answer the question, “What can happen next?”
Here, the interface engine follows the chain of conditions and derivations and finally
deduces the outcome. It considers all the facts and rules as well as sorting them before
concluding to a solution. This strategy is followed for working on conclusion, result, or
effect. For instance, prediction of share market status as an effect of changes in interest
rates.

Page 22 of 32
 Backward Chaining
With this strategy, an expert system finds out the answer to the question, “Why this happened?”
On the basis of what has already happened, the interface engine tries to find out which conditions
could have happened in the past for this result. This strategy is followed for finding out cause or
reason. For example, diagnosis of blood cancer in humans.

User Interface
User interface provides interaction between user of the ES and the ES itself. It is generally
Natural Language Processing so as to be used by the user who is well-versed in the task domain.
The user of the ES need not be necessarily an expert in Artificial Intelligence.
It explains how the ES has arrived at a particular recommendation. The explanation may
appear in the following forms –
Natural language displayed on screen.
Verbal narrations in natural language.
Listing of rule numbers displayed on the screen.
The user interface makes it easy to trace the credibility of the deductions.

Requirements of Efficient ES User Interface


It should help users to accomplish their goals in shortest possible way.
It should be designed to work for user’s existing or desired work practices.
Its technology should be adaptable to user’s requirements, not the other way round.
It should make efficient use of user input.

Expert Systems Limitations


No technology can offer easy and complete solution. Large systems are costly, require
significant development time, and computer resources. ESs have their limitations which include –
Limitations of the technology
Difficult knowledge acquisition
ES are difficult to maintain
High development costs

Page 23 of 32
Expert System Shells
An Expert system shell is a software development environment. It contains the basic components
of expert systems. A shell is associated with a prescribed method for building applications by
configuring and instantiating these components.
An expert system shell in AI refers to the framework or software platform that provides the
infrastructure for building and running expert systems. It serves as a foundation for developing
customized expert systems by providing tools and functionalities to represent knowledge, make
inferences, and deliver intelligent advice.

Shell components and description


The generic components of a shell: the knowledge acquisition, the knowledge Base, the reasoning,
the explanation and the user interface are shown below. The knowledge base and reasoning engine
are the core components.

Applications of Expert System


The following table shows where ES can be applied.
APPLICATION DESCRIPTION
Design Domain Camera lens design, automobile design
Medical Domain Diagnosis Systems to deduce cause of disease
from observed data, conduction medical
operations on humans.
Monitoring systems Comparing data continuously with observed
Page 24 of 32
system or with prescribed behavior such as
leakage monitoring in long petroleum pipeline.
Process Control Systems Controlling a physical process based on
monitoring.
Knowledge Domain Finding out faults in vehicles, computers.
Finance/Commerce Detection of possible fraud, suspicious
transactions, stock market trading, Airline
scheduling, cargo scheduling.

Expert System Technology

There are several levels of ES technologies available. Expert systems technologies include -
Expert System Development Environment − The ES development environment includes hardware
and tools. They are –
o Workstations, minicomputers, mainframes.
o High level Symbolic Programming Languages such as LISt Programming LISP and
PROgrammation en LOGique PROLOG.
o Large databases.

Tools − They reduce the effort and cost involved in developing an expert system to large extent.
 Powerful editors and debugging tools with multi-windows.
 They provide rapid prototyping
 Have Inbuilt definitions of model, knowledge representation, and inference design.

Shells − A shell is nothing but an expert system without knowledge base. A shell provides the
developers with knowledge acquisition, inference engine, user interface, and explanation facility.
For example, few shells are given below –
 Java Expert System Shell JESS that provides fully developed Java API for creating an expert
system.
 Vidwan, a shell developed at the National Centre for Software Technology, Mumbai in
1993. It enables knowledge encoding in the form of IF-THEN rules.

Development of Expert Systems: General Steps


The process of ES development is iterative. Steps in developing the ES include –
Identify Problem Domain
 The problem must be suitable for an expert system to solve it.
 Find the experts in task domain for the ES project.
 Establish cost-effectiveness of the system.

Design the System


 Identify the ES Technology
 Know and establish the degree of integration with the other systems and
databases.
 Realize how the concepts can represent the domain knowledge best.
Page 25 of 32
Develop the Prototype
From Knowledge Base: The knowledge engineer works to –
 Acquire domain knowledge from the expert.
 Represent it in the form of If-THEN-ELSE rules.

Test and Refine the Prototype


o The knowledge engineer uses sample cases to test the prototype for any
deficiencies in performance.
o End users test the prototypes of the ES.

Develop and Complete the ES


 Test and ensure the interaction of the ES with all elements of its
environment, including end users, databases, and other information systems.
 Document the ES project well.
 Train the user to use ES.

Maintain the ES
 Keep the knowledge base up-to-date by regular review and update.
 Cater for new interfaces with other information systems, as those systems
evolve.

Benefits of Expert Systems


1) Availability − They are easily available due to mass production of software.
2) Less Production Cost − Production cost is reasonable. This makes them affordable.
3) Speed − They offer great speed. They reduce the amount of work an individual puts
in.
4) Less Error Rate – Error rate is low as compared to human errors.
5) Reducing Risk − They can work in the environment dangerous to humans.
6) Steady response − They work steadily without getting motional, tensed or fatigued.

What is knowledge representation?


Humans are best at understanding, reasoning, and interpreting knowledge. Human knows things,
which is knowledge and as per their knowledge they perform various actions in the real world. But
how machines do all these things comes under knowledge representation and reasoning.
Hence we can describe Knowledge representation as following:

o 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.

Page 26 of 32
o 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.
o 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.

What to Represent:
The following are the kind of knowledge which needs to be represented in AI systems:

o Object: All the facts about objects in our world domain. E.g., Guitars contains strings,
trumpets are brass instruments.
o Events: Events are the actions which occur in our world.
o Performance: It describe behavior which involves knowledge about how to do things.
o Meta-knowledge: It is knowledge about what we know.
o Facts: Facts are the truths about the real world and what we represent.
o 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).

Knowledge: Knowledge is awareness or familiarity gained by experiences of facts, data, and


situations. Following are the types of knowledge in artificial intelligence:

Types of knowledge
The Following are the various types of knowledge:

1.Declarative Knowledge:

o Declarative knowledge is to know about something.


o It includes concepts, facts, and objects.

Page 27 of 32
o It is also called descriptive knowledge and expressed in declarative sentences.
o It is simpler than procedural language.

2. Procedural Knowledge

o It is also known as imperative knowledge.


o Procedural knowledge is a type of knowledge which is responsible for knowing how to do
something.
o It can be directly applied to any task.
o It includes rules, strategies, procedures, agendas, etc.
o Procedural knowledge depends on the task on which it can be applied.

3. Meta-knowledge:

o Knowledge about the other types of knowledge is called Meta-knowledge.

4. Heuristic knowledge:

o Heuristic knowledge is representing knowledge of some experts in a filed or subject.


o 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:

o Structural knowledge is basic knowledge to problem-solving.


o It describes relationships between various concepts such as kind of, part of, and grouping
of something.
o It describes the relationship that exists between concepts or objects.

The relation between knowledge and intelligence:


Knowledge of real-worlds plays a vital role in intelligence and same for creating artificial
intelligence. Knowledge plays an important role in demonstrating intelligent behavior in AI agents.
An agent is only able to accurately act on some input when he has some knowledge or experience
about that input. Let's suppose if you met some person who is speaking in a language which you
don't know, then how you will be able to act on that. The same thing applies to the intelligent
behavior of the agents.

Page 28 of 32
As we can see in below diagram, there is one decision maker which act by sensing the
environment and using knowledge. But if the knowledge part will not present then, it cannot
display intelligent behavior.

AI knowledge cycle:
An Artificial intelligence system has the following components for displaying intelligent behavior:

o Perception
o Learning
o Knowledge Representation and Reasoning
o Planning
o Execution

The above diagram is showing how an AI system can interact with the real world and what
components help it to show intelligence. AI system has Perception component by which it retrieves
information from its environment. It can be visual, audio or another form of sensory input. The
learning component is responsible for learning from data captured by Perception comportment. In
the complete cycle, the main components are knowledge representation and Reasoning. These two
components are involved in showing the intelligence in machine-like humans. These two
components are independent with each other but also coupled together. The planning and
execution depend on analysis of Knowledge representation and reasoning.

Page 29 of 32
Approaches to knowledge representation:
There are mainly four approaches to knowledge representation, which are given below:

1. Simple relational knowledge:

o It is the simplest way of storing facts which uses the relational method, and each fact about
a set of the object is set out systematically in columns.
o This approach of knowledge representation is famous in database systems where the
relationship between different entities is represented.
o This approach has little opportunity for inference.

Example: The following is the simple relational knowledge


representation.

PLAYER WEIGHT AGE


PLAYER 1 65 24
PLAYER 2 58 16
PLAYER 3 75 22

2. Inheritable knowledge:

o In the inheritable knowledge approach, all data must be stored into a hierarchy of classes.
o All classes should be arranged in a generalized form or a hierarchal manner.
o In this approach, we apply inheritance property.
o Elements inherit values from other members of a class.
o This approach contains inheritable knowledge which shows a relation between instance and
class, and it is called instance relation.
o Every individual frame can represent the collection of attributes and its value.
o In this approach, objects and values are represented in Boxed nodes.
o We use Arrows which point from objects to their values.
o Example:

Page 30 of 32
3. Inferential knowledge:

o Inferential knowledge approach represents knowledge in the form of formal logics.


o This approach can be used to derive more facts.
o It guaranteed correctness.
o Example: Let's suppose there are two statements:

1. Marcus is a man
2. All men are mortal
Then it can represent as;

man(Marcus)
∀x = man (x) ----------> mortal (x)s

4. Procedural knowledge:

o Procedural knowledge approach uses small programs and codes which describes how to do
specific things, and how to proceed.
o In this approach, one important rule is used which is If-Then rule.

Page 31 of 32
o In this knowledge, we can use various coding languages such as LISP
language and Prolog language.
o We can easily represent heuristic or domain-specific knowledge using this approach.
o But it is not necessary that we can represent all cases in this approach.

Requirements for knowledge Representation system:


A good knowledge representation system must possess the following properties.

1. Representational Accuracy:
KR system should have the ability to represent all kind of required
knowledge.
2. Inferential Adequacy:
KR system should have ability to manipulate the representational
structures to produce new knowledge corresponding to existing
structure.
3. Inferential Efficiency:
The ability to direct the inferential knowledge mechanism into the most
productive directions by storing appropriate guides.
4. Acquisitional efficiency- The ability to acquire the new knowledge
easily using automatic methods.

Page 32 of 32

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy