AI - Unit 1
AI - Unit 1
Prof Aarthy G
REVA University- SoCIT
Email : [email protected]
Unit 1 -Syllabus and Textbook
• Problems and search: What is AI, AI Problems; AI Techniques; Problem Space and Problem
Search techniques; Defining the problem as a state space search, production systems; Problem
characteristics, production system characteristics, Issues in the design of search programs;
Heuristic search techniques, generate-and-test; Hill climbing, BFS, DFS; Problem reduction;
Constraint satisfaction.
• TEXT BOOKS:
o Russell & Norvig, “Artificial Intelligence: A Modern Approach”, Third Edition, Prentice-Hall, 2010.
AI_Russell_Norvig.pdf
o Elaine Rich, Kevin Knight, “Artificial Intelligence”, “, 3rdedition, TataMcgraw Hill, 2009
Kevin Knight, Elaine Rich, B. Nair - Artificial Intelligence (2010, Tata McGraw-Hill Education Pvt. Ltd.) - libgen.lc.pdf
• REFERENCE BOOKS:
o Nils J. Nilsson, Elsevier, “Principles of Artificial Intelligence”, 1980. “Artificial Neural Networks”,
o Krishan Mehrotra, Chilkuri K. Mohan, Sanjay Ranka, “Artificial Neural Networks”, Penram International Publishing,
1997.
o B. Yegananarayana, “Artificial Neural Networks”, PHI, 2001.
• Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that are designed
to think and learn like humans.
• AI systems can perform tasks that typically require human intelligence, such as understanding natural
language, recognizing patterns, solving problems, and making decisions.
• AI can be broadly categorized into two types:
• Narrow AI (Weak AI)
• Systematic exploration – uninformed search algorithms explore the search space systematically,
either by expanding all children of a node (e.g. BFS) or by exploring as deep as possible in a single
path before backtracking (e.g. DFS).
• No heuristics – uninformed search algorithms do not use additional information, such as
heuristics or cost estimates, to guide the search process.
• Blind search – uninformed search algorithms do not consider the cost of reaching the goal or the
likelihood of finding a solution, leading to a blind search process.
• Simple to implement – uninformed search algorithms are often simple to implement and
understand, making them a good starting point for more complex algorithms.
• Inefficient in complex problems – uninformed search algorithms can be inefficient in complex
problems with large search spaces, leading to an exponential increase in the number of states
explored.
• Search Algorithm: The Minimax algorithm can be used to evaluate potential moves and
determine the best strategy for each player, aiming to maximize their chances of winning while
minimizing the opponent's chances.
• The working memory is initialized with the known facts about the problem.
• The inference engine matches the rules in the knowledge base against the facts in working
memory.
• Rules whose conditions are satisfied are placed on the agenda.
• A conflict resolution strategy (e.g. priority, recency, etc.) is used to select one rule from the
agenda to fire.
• The selected rule is fired, and its actions update the working memory.
• The cycle repeats from step 2 until a solution is found or no more rules can be fired.
• Let’s create a simple production system for identifying types of geometric shapes based on their
properties:
• Knowledge Base Rules:
• IF the shape has 3 sides AND 3 angles, THEN it is a triangle
• IF the shape has 4 equal sides AND 4 right angles, THEN it is a square
• IF the shape has 4 sides AND opposite sides are parallel, THEN it is a parallelogram.
• Working Memory (initial facts):
• The shape has 3 sides
• The shape has 3 angles
• The inference engine would match the first rule, place it on the agenda, and fire it – updating
working memory with the fact that the shape is a triangle.
• Problems in Artificial Intelligence (AI) come in different forms, each with its own set of challenges
and potential for innovation.
• From image recognition to natural language processing, AI problems exhibit distinct
characteristics that shape the strategies and techniques used to tackle them effectively.
• Overview: This technique expands the node that appears to be closest to the goal, according to a
heuristic function h(n).
• Heuristic: h(n)estimates the cost to reach the goal from node n.
• Pros: Fast and often finds a good solution quickly.
• Cons: It can get stuck in local optima or fail to find the optimal solution because it doesn't
consider the cost already incurred (path cost).
• Example: Finding the shortest path in a maze where the heuristic is the straight-line distance to
the goal.
2 2 ͌͌ 7.07
• H(n) = 𝑥𝑔𝑜𝑎𝑙 − 𝑥𝑛 + 𝑦𝑔𝑜𝑎𝑙 − 𝑦𝑛
• Here, h(n) would be 7.07, guiding the algorithm to prefer paths that seem closest to the goal
according to this distance measure
• Starting at B: B -> C -> A -> D -> B or B -> D -> A -> C -> B with a distance of 11.
• Starting at C: C -> A -> D -> B -> C or C -> B -> D -> A -> C with a distance of 11.
• Starting at D: D -> A -> C -> B -> D or D -> B -> C -> A -> D with a distance of 11.
• So, no matter which node you start at, the shortest possible route that visits all
cities and returns to the starting city has a total distance of 11.
• Output:
00000010
01000000
00000100
00100000
10000000
00010000
00000001
00001000