Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

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

The implementation of two popular graph traversal algorithms, a-star and minimax with alpha-beta pruning, in the context of artificial intelligence. A-star is a widely used path-finding method, while minimax with alpha-beta pruning is a recursive algorithm used for determining the best course of action in two-player games. The theory behind each algorithm and sample code for implementation.

Typology: Study notes

2021/2022

Available from 02/13/2024

versha-parashar
versha-parashar 🇮🇳

4 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

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