Docsity

Implementing A-star Algorithm and Minimax Algorithm with Alpha-beta Pruning in AI, Study notes of Artificial Intelligence

Toggle sidebar
bg1
Experiment 3.2: Searching in AI 2
Aim: Implement the A-star algorithm. Then implement the Minimax algorithm with alpha beta
pruning.
Theory:
A Star Algorithm: One of the best and most widely used methods for path-finding
and graph traversals is the A* Search algorithm.
Minimax algorithm with alpha beta pruning: With the assumption that the opposing
player is likewise playing optimally, the recursive algorithm minimax is used to
determine a player's best course of action. It is used in numerous two-player games,
including tic-tac-toe, go, chess, Isola, checkers, and many others. Because it is possible
to view every action that could be made in a certain game, these games are also known as
games of perfect information. Alpha-beta pruning removes (prunes) all the nodes that
might not be influencing the final decision from a standard minimax algorithm, returning
the same move as the normal one.
Code for A star Algorithm:
pf3
pf4

Partial preview of the text

Download Implementing A-star Algorithm and Minimax Algorithm with Alpha-beta Pruning in AI and more Study notes Artificial Intelligence in PDF only on Docsity!

Experiment 3.2: Searching in AI 2

Aim: Implement the A-star algorithm. Then implement the Minimax algorithm with alpha beta

pruning.

Theory:

A Star Algorithm: One of the best and most widely used methods for path-finding and graph traversals is the A* Search algorithm.  Minimax algorithm with alpha beta pruning: With the assumption that the opposing player is likewise playing optimally, the recursive algorithm minimax is used to determine a player's best course of action. It is used in numerous two-player games, including tic-tac-toe, go, chess, Isola, checkers, and many others. Because it is possible to view every action that could be made in a certain game, these games are also known as games of perfect information. Alpha-beta pruning removes (prunes) all the nodes that might not be influencing the final decision from a standard minimax algorithm, returning the same move as the normal one.

Code for A star Algorithm:

Output for Minimax algorithm with alpha beta pruning.: