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

Improving Performance of this MiniMax with AlphaBeta Pruning

I have the following implementation of a alpha beta minimax for an othello (reversi) game. I've fixed a few of it's problems from this thread. This time I'd like to improve the performance of this function. It's taking a very long time with…
1
vote
1 answer

MiniMax with Alpha Beta Pruning for Othello not working

I have the following implementation of a alpha beta minimax for an othello (reversi) game. Somehow, this never really returns the proper action to take. It seems to return the default action I put in the function (0, 0) and the secondary value of…
1
vote
1 answer

C++ checkers using alpha-beta pruning

I am trying to write an algorithm using alpha-beta pruning for Checkers game (AI vs AI). You can see the code & comments below or in this PasteBin. The game itself works fine but the AI (the alpha-beta pruning algorithm) seems to have an error in…
Zoomba
  • 11
  • 1
  • 2
1
vote
1 answer

Alpha-Beta chess engine search algorithm not making proper moves

I successfully implemented the minimax algorithm, and am looking for an improvement with Alpha-Beta. Currently both algorithm's take an outrageously long time at a search depth of 3+, however minimax works, and Alpa-Beta is making really horrible…
Max
  • 2,710
  • 1
  • 23
  • 34
1
vote
1 answer

When to terminate iterative deepening with alpha beta pruning and transposition tables?

How do I know when I can stop increasing the depth for an iterative deepening algorithm with negamax alpha beta pruning and transposition tables? The following pseudo code taken from a wiki page: function negamax(node, depth, α, β, color) alphaOrig…
ZzetT
  • 568
  • 4
  • 16
1
vote
0 answers

Tic-Tac-Toe - Iterative implementation of alpha beta tree search

Having issues trying to decipher the principal variation (PV) results. "The principal variation is a path from the root to a leaf node, in which every node has the same value. This leaf node, whose value determines the minimax value of the root, is…
vengy
  • 1,548
  • 10
  • 18
1
vote
1 answer

Minimax with alpha-beta pruning yields wrong results

I'm trying to implement an abstract minimax algorithm with alpha beta pruning. The minimax part works great, but as soon as I add alpha beta pruning, the IA starts to behave really silly, even skipping obvious moves. I'm not sure what's going…
mdonati
  • 1,049
  • 11
  • 24
1
vote
0 answers

Java and MiniMax with pruning

I'm trying to implement a MiniMax algorithm with alpha/beta pruning. Totally stuck and can't see where I'm wrong. The class MiniMax contains a State and an Action. The method getAction returns an Action (supposedly the best action to take). The Game…
Palle
  • 19
  • 3
1
vote
0 answers

Alpha Beta prune for chess always returning the first move in the list

I am writing a minimax algorithm with alpha-beta pruning for chess and cannot get the algorithm to return anything but the first move that it generates. I have been knocking my head against but cannot figure out what is going wrong. The code is a…
zcleghern
  • 827
  • 7
  • 21
1
vote
1 answer

Tic tac toe alpha-beta

I am writing a tic-tac-toe game in javascript. I done with the GUI, ect, but I still have a problem with the AI. I use the Alpha-beta-Prune to find the win move. However, my code never give the move that can win a game. I did a lot of research but…
1
vote
2 answers

How to write alphabeta search function in a functional way (no mutable variables)?

This weekends programming fun of mine was to write a 300 lines reversi program in F#. It will probably take a few more weekends to find out how to get alphabeta search parallelized and this is actually out of scope for this question. What I found,…
BitTickler
  • 10,905
  • 5
  • 32
  • 53
1
vote
0 answers

Java : Alpha Beta Pruning

I'm trying to implement a Mini Max & Alpha Beta Pruning algorithm in java, for some reason the Pruning algorithm does not perform a single prune although the algorithm visits 24,911 Nodes. The GameNode values are initiated to -99 for MaxNodes and 99…
1
vote
1 answer

minimax algorithm returning different value with alpha beta pruning

I am writing Minimax algorithm for Chess. I get different final result values for minimax with out alpha beta pruning and minimax with alpha beta pruning. My pseudo code is below. Can anyone help me? miniMax() public int miniMax(int depth, Board…
Rohan
  • 1,312
  • 3
  • 17
  • 43
1
vote
0 answers

alpha beta prunning in game tree with chance node

I am trying to learn alpha beta prunning in game tree with chance node so I found an example and worked on that after solving my tree it looks like this: Now I have couple of questions : First, if we imagine that the range for leaves are from…
HMdeveloper
  • 2,772
  • 9
  • 45
  • 74
1
vote
1 answer

Alpha beta pruning in Checkers (test cases to prove the efficiency)

I have developed a parallelized checkers (English draughts) game using alpha beta pruning in order to find the optimal move that can be made by the machine. I would like to know whether increasing the depth/level of the game tree and searching it…
Aboorva Devarajan
  • 1,517
  • 10
  • 23