0% found this document useful (0 votes)
6 views17 pages

Artificial Intelligence

a proper word document pdf on ai

Uploaded by

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

Artificial Intelligence

a proper word document pdf on ai

Uploaded by

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

ARTIFICIAL INTELLIGENCE

CA-1 Assignment
NAME – BIDISHA SARKAR
DEPARTMENT – COMPUTER SCIENCE &
ENGINEERING ROLL NUMBER –
10200222028
YEAR – 3RD SEMESTER – 5TH
SESSION – 2024 -2025 DATE –
07.08.2024
TOPIC 1: WATER-JUG
PROBLEM
• Abstract
• Introduction
• Problem
Description
• Process
• Algorithm
• Conclusion
• Reference
ABSTRACT
The water jug problem involves measuring a
specific amount of water using two jugs with
different capacities. It illustrates problem-
solving techniques in AI and computer science,
employing operations like filling, emptying,
and transferring water between jugs. This
presentation covers problem definition,
solution strategies, and algorithmic
approaches.
INTRODUCTION
• The water jug problem is a classic example in AI and computer
science.
• Involves two jugs with capacities m and n liters, and a goal to
measure d liters.
• Useful for teaching problem-solving, algorithm design, and
mathematical reasoning.
• Operations allowed include filling, emptying, and
transferring water.
• This presentation explores the problem statement,
solution process,
algorithm, and applications.
• Highlights the relevance of the problem in understanding search
algorithms like BFS and DFS.
PROBLEM DESCRIPTION
• Overview: Classic puzzle in artificial • Operations :
intelligence. • Fill either jug completely.
• Jugs: • Empty either jug completely.
• One jug with a capacity of x liters. • Pour water from one jug to the other
• Another jug with a capacity of y liters. until one is empty or the other is
• Objective: Measure exactly z liters of water. full.
• Constraints: • F o c u s : Pr o b l e m - s o l v i n g a n d
• No volume markings on the jugs. state
• Unlimited water source available. space search.
• Initial State: Both jugs are empty. • Ap p r o a c h : F i n d a n e ff i c i e n t
• Goal State: One jug holds exactly z liters. sequence of steps using the
allowed operations to measure
the desired
amount of water.
PROCESS
•Fill Jug A: Fill jug A to its full capacity.
•Fill Jug B: Fill jug B to its full capacity.
•Empty Jug A: Empty the jug A.
•Empty Jug B: Empty the Jug B.
•Pour from A to B: Pour water from jug A to jug B unless you get an empty jug A or full jug B.
•Pour from B to A: Pour water from jug B to jug A until either jug B is empty or jug A is full.
ALGORITHM
Breadth-First Search(BFS) approach:

Step 1: Start with the initial state where both


jugs are empty.
Step 2: Create a queue and add the initial
state to it.
Step 3: While the queue is not empty:
• Remove the front state from the queue.
• Apply all possible operations to generate
new states.
• Check if any of these new states match the
goal state.
• If a goal state is found, the problem is
solved.
• If not, add the new states to the queue for
further exploration.
Step 4: BFS guarantees finding the shortest path
to the goal state, making it an efficient approach
CONCLUSION

The water jug problem is a timeless puzzle that


has captivated both enthusiasts and AI researchers
alike. Utilizing state space search and production
rules, along with search algorithms such as BFS,
allows for an effective and efficient solution. This
problem not only serves as an engaging challenge
but also exemplifies fundamental concepts in
problem-solving and algorithm design in artificial
intelligence.
TOPIC 1: MIN-MAX APPROACH
OF GAME PLAYING
• Abstract
• Introduction
• Problem
Description
• Process
• Algorithm
• Conclusion
• Reference
ABSTRACT
•Minimax Algorithm: A decision rule
used in game theory and artificial
intelligence.
•Purpose: Determines the optimal
move by minimizing the possible
maximum loss.
•Application: Commonly used in two-
player zero-sum games.
•Goal: Ensure the best possible
outcome for the player assuming the
opponent also plays optimally.
INTRODUCTION

•M i n i m a x Al g o r i t h m : F u n d a m e n t a l i n A I
for decision- making in competitive
games.
• Context : Used in turn- based games
where
players al ternate turns.
•O b j e c t i ve : M a x i m i z e t h e p l a y e r ' s m i n i m u m
g a i n assuming the opponent aims to
minimize the
player' s gain.
• G a m e Typ e : Ty p i c a l l y a p p l i e d t o z e r o - s u m
games where one player' s gain is another ’
s loss.
•Features : Assumes rational behavior f rom
all players, searching through the game t
ree for
optimal st r a t egi es.
PROBLEM DESCRIPTION

•Game Theory Context: Minimax • Game States : Each node in the t


addresses decision-making in games ree
with two players. represents a possible state of the
• Objective: The algorithm aims to game, with edges denoting possible
determine the moves.
best move by evaluating the game tree. •E va l u a t i o n F u n c t i o n : A s s i g n s a
•Game Tree: Represents all possible moves v a l u e to terminal nodes
from the current game state. represent i ng game
•Maximizer vs. Minimizer: One player outcomes.
(Max) aims to maximize their score, •C h a l l e n g e s : T h e ex p o n e n t i a l
while the other (Min) aims to minimize g r o wt h o f t h e g a m e t r e e c a n b e
the score of Max. computationally
intensive, requiring
optimizations l ike alpha- beta
pruning.
PROCESS
• Define the game tree: Map out all possible moves from the current state.
• Evaluate terminal nodes: Assign values based on the game's outcome.
•Apply Minimax rule: Alternate between maximizing and minimizing values along
the tree.
• Propagate values: Compute values for non-terminal nodes based on child
nodes.
•Choose optimal move: Select the move corresponding to the best evaluated
value at the current state.
ALGORITHM
Step 1. Generate the Game Tree: Create nodes for
all possible game states.

Step 2. Evaluate Terminal States: Assign scores


to terminal states.

Step 3. Propagate Scores Upward:


 If it's Max's turn, choose the maximum
score among child nodes.
 If it's Min's turn, choose the minimum score
among child nodes.

Step 4. Select Optimal Move: At the root node, select


the
move with the highest score for Max or the lowest
for Min.

Step 5. Apply Alpha-Beta Pruning (Optional):


Reduce the number of nodes evaluated to
improve efficiency.
CONCLUSION

Effectiveness: The Minimax Challenges: Computationally Future Prospects: Ongoing


algorithm is crucial for AI in Applications: Widely used in intensive for large game research aims to optimize
game theory, ensuring classic games like Chess and trees, but techniques like and apply Minimax in
optimal decision-making in Tic-Tac-Toe. alpha-beta pruning offer complex and real-world
competitive environments. improvements. scenarios.
• https://geeksforgeeks.com
hhhhttttttttppppssss::////////geeksforgeeks.com tutoraihaiaonitm
. cometonce..prsdlepieskdw
il s

• https://www.wikipedia.com
tutorialspoint.com

REFERENCE • https://www.tutorialspoint.com
• https://www.slideshare.net
Thank
You.

You might also like