Questions tagged [alpha-beta-pruning]

A search algorithm that seeks to decrease the number of nodes, which are evaluated by the minimax algorithm, in its search tree

For more info see the Alpha-beta pruning wikipedia article.

304 questions
1
vote
1 answer

Parallelizing checkers game tree generation and searching using MPI

I'm trying to implement an optimal game of checkers in C. In order to find the optimal move of the checker board that can be made by the machine, I have generated a n-ary game tree using (GLib) in C based on the contemporary state of the checker…
Aboorva Devarajan
  • 1,517
  • 10
  • 23
1
vote
1 answer

How to add Threat-Space search to my Tic-Tac-Toe Algorithm?

(Tic-Tac-Toe: a 2 player game (player x and player o) on 15x15 board, where one player who forms a chain of 5 stones first wins) More description So I've implemented a Tic-Tac-Toe algorithm that uses simple alpha beta pruning.. This is what I have…
user2492270
  • 2,215
  • 6
  • 40
  • 56
1
vote
0 answers

Alpha Beta Pruning Algorithm Java

I've been working on the code for alpha-beta pruning for a Connect Four game and I can't seem to get it right. I thought I implemented it correctly at first, but the algorithm would return the column 1 every time. I have two ints val and nodeVal…
user2997689
1
vote
1 answer

How is the alpha value in alpha-beta pruning algorithm used and updated?

I was looking at the post Strange behaviour in a function while implementing the alpha-beta pruning algorithm and the accepted answer, where it is stated: "Your rootAlphaBeta doesn't update the alpha value". I was wondering what the necessary…
Frank Epps
  • 569
  • 1
  • 7
  • 21
1
vote
1 answer

How to get best move from Minimax with Alpha Beta Pruning in C#?

I know this has been asked before, but I was not able to figure this one out. I have a 7x7 board, for a connect-4ish game. I defined this method, to implement Minimax's Alpha Beta pruning. It should be returning me the heuristic, and setting the…
nmdias
  • 3,888
  • 5
  • 36
  • 59
1
vote
2 answers

Concurrently search a game tree using minimax and AB pruning. Is that possible?

I'm going be competing in a board game AI competition at my school and am trying to come up with some ideas for concurrency to gain an edge. I will most likely be at a disadvantage because I will be implementing it in java and I understand c or c++…
1
vote
1 answer

Heuristic function in an Alpha-Beta Pruning algorithm for a Othello/Reversi game

I'm implementing an Alpha-Beta Pruning algorithm that will be used to get the best move in an Othello game. When the algorithm have reached a leaf node (i.e there is no valid moves or it reached the maximum depth) I calculate the heuristic value of…
simon
  • 2,042
  • 2
  • 20
  • 31
1
vote
1 answer

MinMax Simple Demonstration for TicTacToe

I have been pulling out my hair trying to figure out how the MinMax algorithm, and hopefully the alpha-beta pruning algorithms work. I'm confused as to the recursion that occurs. Firstly, does each intermediate board get scored? or only terminal…
Dosworld
  • 25
  • 3
1
vote
1 answer

Iterative deepening or trial and error?

I am coding a board game. I have generated a game tree using alpha-beta pruning and have 2 options: Use iterative deepening to optimize the alpha-beta so that it keeps generating one more ply until time is over. By trial and error, I know the…
1
vote
1 answer

Alpha beta pruning root move

I am currently writing a chess engine and have progressed decently far, I have however run into a problem and would like a few opinions on the manner. Ok, my problem is the fact that my chess AI doesnt make the "best" move, It seems to fail to see…
Ben Purdy
  • 45
  • 1
  • 7
0
votes
1 answer

Alpha-Beta Pruning Minimax Algorithm Not Providing Correct Optimal Move in Tic-Tac-Toe AI

I'm working on a Tic-Tac-Toe AI implementation using the Alpha-Beta Pruning Minimax algorithm. The goal is to find the optimal move for the AI player (X) on the given board. However, I'm encountering an issue where the algorithm is not returning the…
0
votes
0 answers

why does this minimax algorithm output the same moves every time no matter what?

I'm trying to make a simple chess AI in python but when I try to play a game using this algorithm to find the best move it outputs the same thing every time (Nh6, Rg8, Rh8, Rg8...). # Minimax algorithm with alpha-beta pruning def minimax(board,…
Hello
  • 1
  • 3
0
votes
0 answers

How to test implementation of alpha beta pruning?

I'm working on a chess engine and have implemented Negamax with alpha beta pruning. I have noticed that fewer nodes are being searched (depth 5 in the starting position goes from 4,865,609 to 701,028 nodes searched), but I am not sure if it is…
Gwoodz
  • 23
  • 4
0
votes
0 answers

MiniMax Search with Alpha Beta Error with Timing of Resetting Board

so I have just started programming a simple chess engine in Python. I am currently working on updating my search to include Alpha Beta pruning. Here is my current search function def getBestMove(board, depth, maximizingPlayer, alpha=float('-inf'),…
tyl3366
  • 67
  • 1
  • 6
0
votes
0 answers

Move Ordering Not Significantly Improving Minimax Efficiency

I'm currently making a chess AI, and I've made all the basic elements (e.g. a board representation, minimax algorithm with alpha-beta, etc.), but it's still pretty slow. I've seen that ordering the moves before you pass them into the minimax speeds…