Ai Short Notes
Ai Short Notes
Overview of AI: Introduction to AI, Importance of AI, AI and its related field, AI techniques,
Criteria for success.
Problems, problem space and search: Defining the problem as a state space search, Production
Systems and its characteristics, Issues in the design of the search programs.
Heuristic search techniques: Generate and test, hill climbing, best first search technique, problem
reduction, constraint satisfaction.
Introduction to AI
"It is a branch of computer science by which we can create intelligent machines which can
behave like a human, think like humans, and be able to make decisions."
Artificial Intelligence is composed of two words Artificial and Intelligence, where Artificial defines
"man-made," and intelligence defines "thinking power", hence AI means "a man-made thinking
power."
Importance of AI
● AI technology is important because it enables human capabilities – understanding,
reasoning, planning, communication and perception – to be undertaken by
software increasingly effectively, efficiently and at low cost.
● General analytical tasks, including finding patterns in data, that have been
performed by software for many years can also be performed more effectively using
AI.
● The automation of these abilities creates new opportunities in most business sectors
and consumer applications.
● Significant new products, services and capabilities enabled by AI include
autonomous vehicles, automated medical diagnosis, voice input for human-
computer interaction, intelligent agents, automated data synthesis and enhanced
decision-making.
● AI has numerous, tangible use cases today that are enabling corporate revenue
growth and cost savings in existing sectors.
● Applications will be most numerous in sectors in which a large proportion of time is
spent collecting and synthesising data: financial services, retail and trade,
professional services, manufacturing and healthcare. Applications of AI-powered
computer vision will be particularly significant in the transport sector.
● Use cases are proliferating as AI’s potential is understood. We describe 31 core use
cases across eight sectors: asset management, healthcare, insurance, law &
compliance, manufacturing, retail, transport and utilities.
Application of AI
Artificial Intelligence has various applications in today's society. It is becoming essential for
today's time because it can solve complex problems with an efficient way in multiple
industries, such as Healthcare, entertainment, finance, education, etc. AI is making our daily
life more comfortable and fast.
Following are some sectors which have the application of Artificial Intelligence:
1. AI in Astronomy
○ In the last, five to ten years, AI becoming more advantageous for the healthcare
industry and going to have a significant impact on this industry.
○ Healthcare Industries are applying AI to make a better and faster diagnosis than
humans. AI can help doctors with diagnoses and can inform when patients are
worsening so that medical help can reach to the patient before hospitalization.
3. AI in Gaming
○ AI can be used for gaming purpose. The AI machines can play strategic games like
chess, where the machine needs to think of a large number of possible places.
4. AI in Finance
○ AI and finance industries are the best matches for each other. The finance industry is
implementing automation, chatbot, adaptive intelligence, algorithm trading, and
machine learning into financial processes.
5. AI in Data Security
○ The security of data is crucial for every company and cyber-attacks are growing very
rapidly in the digital world. AI can be used to make your data more safe and secure.
Some examples such as AEG bot, AI2 Platform,are used to determine software
bugs and cyber-attacks in a better way.
6. AI in Social Media
○ Social Media sites such as Facebook, Twitter, and Snapchat contain billions of user
profiles, which need to be stored and managed in a very efficient way. AI can
organise and manage massive amounts of data. AI can analyse lots of data to
identify the latest trends, hashtags, and requirements of different users.
8. AI in Automotive Industry
○ Some Automotive industries are using AI to provide virtual assistants to their users
for better performance. Such as Tesla has introduced TeslaBot, an intelligent
virtual assistant.
○ Various Industries are currently working on developing self-driven cars which can
make your journey more safe and secure.
9. AI in Robotics:
○ Artificial Intelligence has a remarkable role in Robotics. Usually, general robots are
programmed such that they can perform some repetitive task, but with the help of
AI, we can create intelligent robots which can perform tasks with their own
experiences without being pre-programmed.
○ Humanoid Robots are the best examples for AI in robotics, recently the intelligent
Humanoid robot named Erica and Sophia has been developed which can talk and
behave like humans.
10. AI in Entertainment
○ We are currently using some AI based applications in our daily life with some
entertainment services such as Netflix or Amazon. With the help of ML/AI
algorithms, these services show the recommendations for programs or shows.
11. AI in Agriculture
○ Agriculture is an area which requires various resources, labor, money, and time for
best results. Nowadays agriculture is becoming digital, and AI is emerging in this
field. Agriculture is applying AI as agriculture robotics, solid and crop
monitoring, predictive analysis. AI in agriculture can be very helpful for farmers.
12. AI in E-commerce
13. AI in education:
○ AI can automate grading so that the tutor can have more time to teach. AI chatbot
can communicate with students as a teaching assistant.
○ AI in the future can work as a personal virtual tutor for students, which will be
accessible easily at any time and any place.
Subsets of AI
Machine Learning
Machine Learning, a crucial subset of artificial intelligence, is the machine’s ability to learn
from experience with no need for human intervention explicitly. It is the most widely used
form of AI in the market today. Machine Learning refers to the computer programs that
are fed data, learn from them and use this experience to make intelligent decisions.
Machine Learning is used in analysis, fraud detection and GPS based predictions to
name a few.
Neural Networks
Neural networks are a bunch of algorithms modelled after the neural networks that make up
the human brain. They are designed to absorb and assimilate and interpret sensory data
through labelling or clustering row input. The patterns they sense and interpret are in the form
of numerical data, a format all text, images or even sounds must be translated into for a
computer to understand. They help label, cluster and classify data based on similarities in the
input fed.
Deep Learning
Deep Learning is a technique of machine learning that uses neural networks to learn up the
way humans do – by example. And it does them accurately. It is the science behind driverless
cars that can distinguish a lamppost from a person. Deep learning requires a large
amount of labelled data sets to be able to work and effective and substantial computing
power. Deep Learning finds its applications in aerospace technology, healthcare and
driverless locomotives industry among others.
Robotics
A robot is a machine capable of sensing and interpreting and interacting with its environment.
Robots have become much smarter and intuitive, thanks to artificial intelligence. Robotics is
an interdisciplinary field of science and engineering that is powered by a consolidated
science of mechanical engineering, electrical engineering, computer science, and
algorithms. Robots are used in automobile manufacturing and used to move objects in space
or related fields.
Computer Vision
Computer Vision is the field of study that seeks to enable computers to “see” virtually like
the human eyes do. A computer learns by labelling or classifying various objects, albeit much
faster than human beings. Its goal is image classification and recognition. The Internet is
inundated with pictures and photographs. In order to search for these images, the computer
system needs to know what is in them. This is where the technology of computer visions
comes in.
So you see how vast the scope of artificial intelligence really is. It is a science unto itself. To
learn more about the science, professionals are increasingly joining artificial intelligence
training institutes across the world. DexLab Analytics, the institute that brought this article
to you, is a premiere artificial intelligence training institute in Gurgaon.
Criteria for success
The criteria for success in AI can vary depending on the specific application or task being
performed, but some general criteria include:
- Accuracy: AI systems should be able to achieve high levels of accuracy in their
predictions or classifications. This means that their output should be consistent and
reliable.
- Speed: AI systems should be able to perform their tasks quickly, especially in real-
time applications such as autonomous vehicles or medical diagnosis.
- Scalability: AI systems should be able to handle large volumes of data and scale up to
meet increasing demands as needed.
- Ethical considerations: AI systems should be developed and used in ways that are
ethical and aligned with human values, with appropriate safeguards in place to
prevent bias, discrimination, or other negative impacts.
- Generalization: AI systems should be able to apply what they have learned from one
task to new situations, without requiring extensive retraining or modification.
A state space is a collection of all possible configurations of a problem, and the goal of the
search is to find a path from an initial state to a goal state, where each step along the path is a
valid state transition.
To define a problem as a state space search, you need to identify the following
components:
- State Space: The set of all possible configurations or states of the problem.
+ Initial State: The starting point from which the search algorithm begins its exploration
of the state space.
- Actions: The set of valid actions or operations that can be performed on the current
state to generate a new state.
- Transition Function: A function that maps a current state and an action to a new state.
- Goal Test: A test that determines whether a given state is a goal state or not.
- Path Cost Function: A function that assigns a cost to each transition from one state to
another.
Once you have defined these components, you can use search algorithms such as Breadth-
First Search (BFS), Depth-First Search (DFS), or A* Search to find the optimal path from the
initial state to the goal state.
Production Systems and their issues:
Production systems are a type of AI architecture used to represent and automate knowledge-
based decision-making processes. They consist of a set of rules and a control strategy for
applying those rules to incoming data. The following are some characteristics of production
systems:
- Rule-based: Production systems use a set of rules to make decisions or take actions.
The rules are typically expressed as if-then statements, where the if part describes the
conditions under which the rule is applicable and the then part describes the action to
be taken.
- Modularity: Production systems are modular in design, meaning that the rules are
organized into independent modules that can be easily added, modified, or removed
without affecting the rest of the system.
- Inference engine: Production systems use an inference engine to apply the rules to
incoming data and generate new data. The inference engine uses a control strategy to
decide which rule to apply next, based on the current state of the system.
However, there are also issues in the design of search programs in AI. Some of these
issues are:
Search space explosion: In many search problems, the number of possible solutions is so
large that searching through all of them is not feasible. This is known as the search space
explosion problem.
- Local optima: In some search problems, the search algorithm can get stuck in a
suboptimal solution and fail to find the global optimal solution. This is known as the
local optima problem.
- Heuristics: Search algorithms often rely on heuristics to guide the search process.
However, choosing the right heuristics can be difficult, and poorly chosen heuristics
can lead to suboptimal solutions.
- Trade-offs: Search algorithms often involve trade-offs between various factors, such
as speed, accuracy, and memory usage. Designing an optimal search algorithm often
requires balancing these trade-offs to achieve the best overall performance.
(proceeding to a solution by trial and error or by rules that are only loosely defined.)
Search Algorithms
Many traditional search algorithms are used in AI applications. For complex problems, the
traditional algorithms are unable to find the solutions within some practical time and space
limits. Consequently, many special techniques are developed, using heuristic functions.
The algorithms that use heuristic functions are called heuristic algorithms.
• Heuristic algorithms are not really intelligent; they appear to be intelligent because they
achieve better performance.
• Heuristic algorithms are more efficient because they take advantage of feedback from the data
to direct the search path.
• Uninformed search algorithms or Brute-force algorithms, search through the search space all
possible candidates for the solution checking whether each candidate satisfies the problem’s
statement.
• Informed search algorithms use heuristic functions that are specific to the problem, apply
them to guide the search through the search space to try to reduce the amount of time spent in
searching.
A good heuristic will make an informed search dramatically outperform any uninformed search:
for example, the Travelling Salesman Problem (TSP), where the goal is to find is a good solution
instead of finding the best solution.
In such problems, the search proceeds using current information about the problem to predict
which path is closer to the goal and follow it, although it does not always guarantee to find the
best possible solution. Such techniques help in finding a solution within reasonable time and
space (memory). Some prominent intelligent search algorithms are stated below:
There are some more algorithms. They are either improvements or combinations of these.
• Hierarchical Representation of Search Algorithms: A Hierarchical representation of most
search algorithms is illustrated below. The representation begins with two types of search:
• Uninformed Search: Also called blind, exhaustive or brute-force search, it uses no
information about the problem to guide the search and therefore may not be very efficient.
• Informed Search: Also called heuristic or intelligent search, this uses information about the
problem to guide the search—usually guesses the distance to a goal state and is therefore
efficient, but the search may not be always possible.
Breadth-first search
A Search strategy, in which the highest layer of a decision tree is searched completely before
proceeding to the next layer is called Breadth-first search (BFS).
• In this strategy, no viable solutions are omitted and therefore it is guaranteed that an optimal
solution is found.
• This strategy is often not feasible when the search space is large.
Algorithm
1. Create a variable called LIST and set it to be the starting state.
2. Loop until a goal state is found or LIST is empty, Do
a. Remove the first element from the LIST and call it E. If the LIST is empty, quit.
b. For every path each rule can match the state E, Do
(i) Apply the rule to generate a new state.
(ii) If the new state is a goal state, quit and return this state.
(iii) Otherwise, add the new state to the end of LIST.
Advantages
1. Guaranteed to find an optimal solution (in terms of shortest number of steps
to reach the goal).
2. Can always find a goal node if one exists (complete).
Disadvantages
1. High storage requirement: exponential with tree depth.
Depth-first search
A search strategy that extends the current path as far as possible before backtracking to the last
choice point and trying the next alternative path is called Depth-first search (DFS).
• This strategy does not guarantee that the optimal solution has been found.
• In this strategy, search reaches a satisfactory solution more rapidly than breadth first, an
advantage when the search space is large.
Algorithm
Depth-first search applies operators to each newly generated state, trying to drive directly toward
the goal.
1. If the starting state is a goal state, quit and return success.
2. Otherwise, do the following until success or failure is signalled:
a. Generate a successor E to the starting state. If there are no more successors, then signal failure.
b. Call Depth-first Search with E as the starting state.
c. If success is returned signal success; otherwise, continue in the loop.
Advantages
1. Low storage requirement: linear with tree depth.
2. Easily programmed: function call stack does most of the work of maintaining state of the
search.
Disadvantages
1. May find a sub-optimal solution (one that is deeper or more costly than the best solution).
2. Incomplete: without a depth bound, may not find a solution even if one exists.
Deciding which node to expand next, instead of doing the expansion in a strictly breadth-
first or depth-first order;
Heuristic is a function which is used in Informed Search, and it finds the most promising
path.
It takes the current state of the agent as its input and produces the estimation of how close
agent is from the goal.
Heuristic function estimates how close a state is to the goal. It is represented byh(n), and it
calculates the cost of an optimal path between the pair of states.
The heuristic method, however, might not always give the best solution, but it guaranteed to
find a good solution in reasonable time.
This technique always uses to find solution quickly.
Informed Search Define a heuristic function. h(n). that estimates the “goodness" of a node n.
The heuristic function is an estimate, based on domain-specific information that is
computable from the current state description of how close we are to a goal.
Specifically, h(n) = estimated cost (or distance) of minimal cost path from state ‘n’ to a goal
state.
A heuristic function at a node n is an estimate of the optimum cost from the current node toa
goal.
Denoted by h(n)
h(n) = estimated cost of the cheapest path from node n to a goal node
For example, suppose you want to find a shortest path from Kolkata to Guwahati, then heuristic
for
Guwahati may be straight-line distance between Kolkata and Guwahati, that is
h(Kolkata) = euclideanDistance(Kolkata,Guwahati)
3.7.2 Formulation of informed (heuristic) search problem as State Space
Informed search problems can be represented as state space. The state space of a problem
includes: an Initial state, one or more goal state, set of state transition operator O (a set of rules),
used to change the current state to another state and a heuristic function h.
In general, a state space is represented by 5 tuples as follows: S: [S, s ,O, G, h]
Where S: (Implicitly specified) Set of all possible states (possibly infinite).
s : start state of the problem, s ∈ S .
O: Set of state transition operator, each having same cost. This is used to change the state from
one state to another. It is the set of arcs (or links) between nodes
G: Set of Goal state, G ⊆ S.
h(): A heuristic function, estimating the distance toa goal node.
We need to find a sequence of actions which transform the agent from the initial sate
s to Goal
state G. State space is commonly defined as a directed graph or as a tree in which each node is a
state and each arc represents the application of an operator transforming a state to a successor
state.
Thus, the problem is solved by using the rules (operators), in combination with an appropriate
control strategy, to move through the problem space until a path from initial state to a goal state
is found. This process is known as search. A solution path is a path in state space from
s (initial
sate) to G (Goal state).
We have already seen an OPEN list is used to implement an uninformed (Blind) search (section
3.2). But the problem with using only one list OPEN is that, it is not possible to keep track of the
node which is already visited. That is “how we can maintain a part of the state space that is
already visited”. To save the explicit space, we maintained another list called CLOSED. Now
we can select a node from OPEN and save it in CLOSED. Now, when we generate successor
node from CLOSED, we check whether it is already in (OPEN ∪ CLOSED).
If it is already in
(OPEN ∪ CLOSED), we will not insert in OPEN again, otherwise insert.
.........
6. LOOP:Goto Step 2
OR Pseudocode (for Best-First Search algorithm)
Step 1: Place the starting node into the OPEN list.
Step 2: If the OPEN list is empty, Stop and return failure.
Step 3: Remove the node n, from the OPEN list which has the lowest value of h(n),
and places it in the CLOSED list.
Step 4: Expand the node n, and generate the successors of node n.
Step 5: Check each successor of node n, and find whether any node is a goal node
or not. If any successor node is goal node, then return success and terminate the
search, else proceed to Step 6.
Step 6: For each successor node, algorithm checks for evaluation function f(n), and
then check if the node has been in either OPEN or CLOSED list. If the node has not
been in both lists, then add it to the OPEN list.
Step 7: Return to Step 2.
Let heuristic function value h(n) for each node n to goal node G is defined as
Straight line distance
A→G=h(A)=40
B→G=h(B)=32
C→G=h(C)=25
D→G=h(D)=35
E→G=h(E)=19
F→G=h(F)=17
H→G=h(H)=10
G→G=h(G)=0
h(n)= straight line distance from node n to G
Note that h(G)=0
The nodes added/deleted from OPEN and CLOSED list using Best-First Search algorithm are
shown below.
Space Complexity:
The worst-case space complexity of Greedy best first search is O(bm
A* Algorithm
A* search is the most commonly known form of best-first search. It uses heuristic function h(n),
and cost to reach the node n from the start state g(n). It has combined features of uniform cost
search (UCS) and greedy best-first search, by which it solves the problem efficiently. A* search
algorithm finds the shortest path through the search space using the heuristic function. This
search algorithm expands less search tree and provides optimal result faster.
In A* search algorithm, we use search heuristic as well as the cost to reach the node. Hence, we
can combine both costs as following, and this sum is called as a fitness number (Evaluation
Function).
solution which can reached from node. In other words, a heuristic is called admissible if it
always under-
estimates, that is, we always have h(n) ≤ h (n), where h*(n) denotes
the minimum distance to a goal
Working of A* algorithm
Example1: Let’s us consider the following graph to understand the working of A* algorithm.
The numbers written on edges represent the distance between the nodes. The numbers written on
nodes represent the heuristic value. Find the most cost-effective path to reach from start state A
to final state J using A* Algorithm.
Step-1:
We start with node A. Node B and Node F can be reached from node A. A* Algorithm
calculates f(B) and f(F). Estimated Cost f(n) = g(n) +h(n) for Node B and Node F is:
f(B) = 6+8=14
f(F) = 3+6=9
Since f(F) < f(F), so it decides to go to node F.
Closed list (F)
Path- A →F
Step-2: Node G and Node H can be reached from node F.
A* Algorithm calculates f(G) and f(H).
f(G) = (3+1)=5=9
f(H) = (3+7) +5=13
Since f(G) < f(H), so it decides to go to node G.
Closed list (G)
Path- A→F→G
Step-3: Node I can be reached from node G.
A* Algorithm calculates f(I).
f(I)=(3+1+3)+1=8; It decides to go to node I.
Closed list (I).
Path- A→F→G→I
Step-4: Node E, Node H and Node J can be reached from node I.
A* Algorithm calculates f(E), f(H), f(J).
f(E) = (3+1+3+5) + 3 =15
f(H) = (3+1+3+2) + 3 = 12
f(J) = (3+1+3+3) +0 = 10
Since f(J) is least, so it decides to go to node J.
Closed list (J)
Shortest Path - A→F→G→I→J
Path Cost is 3+1+3+3=10
Example 2:Consider the following graph and apply A* algorithm and find the most cost-
effective path to reach from start state S to final stateG. The heuristic function value of each
Solution:
S→A=1+3=4
S→G=10+0=10
S→A→B=1+2+4=7
S→A→C=1+1+2=4
S→A→C→D=1+1+3+6=11
S→A→C→G=1+1+4=6
S→A→B→D=1+2+5+6=14
S→A→C→D→G=1+1+3+2=7
S→A→B→D→G=1+2+5+2=10
3.8.2 Advantages and disadvantages of A* algorithm
Advantages:
A* search algorithm is the best algorithm than other search algorithms.
A* search algorithm is optimal and complete.
This algorithm can solve very complex problems.
Disadvantages:
It does not always produce the shortest path as it mostly based on heuristics and
approximation.
A* search algorithm has some complexity issues.
The main drawback of A* is memory requirement as it keeps all generated nodes in the
memory, so it is not practical for various large-scale problems.
Goal : Steal
a bike
Goal : Get
some money
Goal : Buy a
bike
AND Arc
AND
OR
Note that, the graph given in fig 2, there are two paths for solution from start state S: either S-A-
B or S-C. To calculate the cost of the path we use the formula f(n)=g(n)+h(n) [note that here g(n)
node D is 3, so now the revised cost of node A, that is f(A-D-H)=4. This path is better than f(A-
E)=7. So, the final revised cost of node A is 4. Now the final revised cost of f(S-A-
B)=1+1+4+12=18 (revised).
AO* algorithm
Our real-life situations cannot be exactly decomposed into either AND tree or OR tree but is
always combination of both. So, we need an AO* algorithm where O stands for 'ordered'. Instead
of two lists OPEN and CLOSED of A* algorithm, we use a single structure GRAPH in AO*
algorithm. If represents a part of the search graph that has been explicitly generated so far. Please
note that each node in the graph will point both down to its immediate successors and to its
immediate predecessors. Also note that each node will have some h'(n) value associated with it.
But unlikeA* search, g(n) is not stored. It is not possible to compute a single value of g(n) due to
many paths to the same state. It is not required also as we are doing top-down traversing along
best-knownpath.
This guarantees that only those nodes that are on the best path are considered for expansion
Hence, h'(n) will only serve as the estimate of goodness of a node.
Next, we develop an AO* algorithm.
Algorithm AO*
3.9.3 Advantage of AO* algorithm
Note that AO* will always find a minimum cost solution if one exists ifh’(n) < h(n)and that all
arc
costs are positive. The efficiency of this algorithm will depend on how closelyh’(n)
approximates h(n).
Also note that AO* is guaranteed to terminate even on graphs that have cycles.
Note: When the graph has only OR node then AO* algorithm works just like A* algorithm.
that subset. The search space of CSPS is often exponential. Therefore a number of different
approaches to the problem have been proposed to reduce the search space and find a feasible
solution in a reasonable time based on the search space exploring and variable selection
heuristics different algorithms and can be developed for a CSP problem. The algorithms can
be divided into two major categories such as complete and incomplete algorithm.
Complete algorithms seek any solution or solutions of a CSP or they try to prove that no
solution into the categories like constraint propagation techniques which tries to eliminate
values that are consistent with some constraints and systematic search techniques. Which
explores systematically the whole search space. But on the other hand incomplete search
methods do not explore the whole search space. They search the space either non-
systematically or in a systematic manner, but with a limit on some resource.
They may not provide a solution but their computational time is reasonably reduced. They
cannot be applied to find all solutions or to prove that no solution exists. Let us look an
algorithm to solve a constraint satisfaction problem.
Algorithm:
3) Select an object and strengthen as much as possible. The set of constraints that
apply to object.
4) If set of constraints is different from previous set then open all objects that share
any of these constraints. Remove selected objects.
8) Select an object with a number assigned value and try strengthen its constraints.
themselves with strictly the goal state. They take advantage of general state representation.
Intuition
States — represent them as a vector of feature values (a set of k variables), each variable has
a domain of unique values. The state is specified by assigning values to all the variables, and
To solve a CSP we find a set of values for the features to satisfy the conditions.
A formal definition:
A CSP consists of
Each constraint has a scope or a set of variables that can be operated on.
The goal is to satisfy the constraint by assigning the right values. A CSP is cannot be satisfied
if no solution exists.
A CSP problem can be defined as a search problem where the initial state is an empty
assignment to a variable, the function is assigning values to variables and the goal test is to
Backtracking Search
Since CSPs do not require finding a path to a goal, they just require the correct configurations
to the goal. We can solve these best by backtracking from the goal or reverse engineering the
problem.
Method:
Implementation:
Else:
2. Test the constraints of V and all other variables that were assigned
2. If a constraint fails than return, else keep recursing.
Constraint Propagation
There might be variables that have no possible values, but backtracking does not detect this
We can look ahead at the unassigned variables trying to detect the failures.
Propagation has to be applied to the search and almost if not all every nodes in the tree. Since
Forward Checking:
When instantiating a variable V, do the following for all constraints C that have only one not
heuristic.
Select the variable that is involved in the largest number of constraints on other unassigned
variables.
If a variable has only one value left, we propagate its consequences immediately.
other variables. d is said to be Arc Inconsistent. We can remove d from the domain of the
For example.
So that X > Y.
All constraints must be GAC at every node of the search space. We do this by removing these
inconsistent variables. Every time we assign a value to a variable, we check all the constraints
and remove the inconsistent variables. We have to do this until everything is consistent.
Properties
When all constraints are consistent:
Each domain has a single value, at least a domain is empty, some may have more than one
Conclusions
Plain backtracking offers the advantage of checking a constraint when it has zero unassigned
variables
Forward Checking checks a constraint only when it has one unassigned variables
GAC checks all constraints, leading to removing more incorrect values. (During the initial
GAC does not find a solution unless we do search while we enforce GAC.
Thus constraint satisfaction problems can be improved using GAC, checking and
backtracking.
Advantages:
independent constraints. This modularity makes it easier to add, remove or modify constraints
as needed.
Efficiency: Constraint satisfaction algorithms can be designed to be highly efficient and can
solve problems quickly and accurately. This makes it ideal for real-time applications, such as
Disadvantages:
Limited applicability: Constraint satisfaction is not suitable for all types of problems,
especially those that do not have a clear set of constraints or that involve continuous
variables.
especially when the number of variables and constraints is large. The search space can
become very large, which can make it difficult to find a solution in a reasonable amount of
time.
Scalability: Constraint satisfaction problems can become exponentially more difficult to solve
as the number of variables and constraints increases. This can make it difficult to solve very
large problems.
designed to prioritise accuracy or efficiency, but it can be difficult to strike the right balance
between the two. Some algorithms may sacrifice accuracy for efficiency, while others may