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
0
votes
1 answer

Minimax algorithm not working with depth >1

I am doing a board game on python where I need to implement the algorithm minimax. When I try to increase the depth of my search my program stops working. I also tried to implement the alpha beta cuts but it seems to not being working correctly.…
0
votes
1 answer

How do I write a Multi threaded Alpha-Beta Search algorithm?

I'm trying to create a chess engine using an alpha beta minimax search algorithm, but the code is too slow. I've done all the optimisations I can think of, but it is still very slow in a single thread. I looked at the source code of some other…
0
votes
0 answers

Passing integers for minimax algorithm python

I implemented the following minimax algorithm for the reversi GamePigeon game in python: def minimaxabp(depth, max_player, game, move, alpha, beta): if depth == 0 or game.gameOver: return game.calcScore() if (max_player): moves =…
0
votes
1 answer

Chess engine beta cutoff making engine less threatening?

I'm quite new to chess programming and have ran into a problem with the search. At the moment, my engine has a simple, "standard" negamax search with a basic evaluation function (pure material counts, non-positional). But the outcome is that given…
Mark G
  • 85
  • 1
  • 5
0
votes
1 answer

local Variable 'beta' referenced before assignment

My program uses the minimax-algorithm to choose the most otimal move against the human player in tic-tac-toe. (this is working) After that I tried to implement the alpha-beta-pruning to optimize the time the algorithm needs in order to get the…
0
votes
1 answer

Why is my chess algorithm producing seemingly random moves?

I am using a simple minimax/alpha-beta pruning algorithm to create a chess "AI", but it keeps producing the same moves to start, no matter the move I make. For instance, white plays e4, black (AI) plays a6, white plays d4, black plays Ra7, and then…
0
votes
1 answer

Best way to implement Alpha Pruning in my code?

I am currently learning Mini Max and AlphaBetaPruning with a tic tac toe game. I was able to implement and understand Mini max, but unsure how to combine alpha-beta pruning with my current code. Will I have to restart completely? or code another…
0
votes
2 answers

Loop over a list from the middle outwards

I am making a connect four AI and would like the AI to loop through the available moves from the middle and outwards because in connect four the middle moves are usually better and then the probability of alpha beta pruning happening is much…
TNT_7
  • 3
  • 1
0
votes
1 answer

Minimax Alpha Beta Pruning not working, but Minimax alone does

My problem is when applying Alpha/Beta Pruning to Minimax. It does very wierd and bad moves. When I use Minimax without Alpha/Beta, it works fine. The two functions look like this: Minimax With Alpha/Beta Pruning: public int minimaxAB(Piece[,]…
foRei
  • 9
  • 1
0
votes
1 answer

How to implement transposition tables with alpha beta pruning

I'm trying to make an implementation of transposition tables in my negamax. But first I want to understand all of the ideas in the pseudo code: ` function negamax(node, depth, α, β, color) is alphaOrig := α (* Transposition Table Lookup; node is the…
James Urian
  • 123
  • 3
  • 7
0
votes
0 answers

Alpha-beta pruning makes worse decisions when fully implemented

I am writing a basic chess AI using a minimax algorithm. I implemented alpha-beta pruning which seemed to work fine. Here's the code: def move(self, board): moves = {} for move in board.legal_moves: board.push(move) …
0
votes
0 answers

Negamax Algorithm with Alpha-Beta and Quiesce Search with Teams (4 Players)

Hey I am trying to implement negamax with alpha-beta and quiesce search with 4 players but it is a little different. For example, lets say 0 = Red, 1 = Blue, 2 = Yellow, and 3 = Green, and Red and Green are on the same team meaning 2 turns will be…
0
votes
1 answer

prolog alpha-beta unexpected results

I have modified a generic alpha-beta from a book to be depth limited. When printing out the best position search results it sometimes works and sometimes I get a nuisance result such a the number 8. This is a very generic alpha-beta from "prolog for…
Benny Abramovici
  • 569
  • 1
  • 4
  • 20
0
votes
1 answer

Type of tree for Alpha-Beta Pruning

I am making an AI application where I found about minimax and Alpha-beta pruning. I found that in the program I already used the concept of minimax. I found that Alpha-beta pruning reduces branches to search for. So my question is what type of tree…
0
votes
0 answers

What is Alpha beta pruning? How to draw game Values From State?

Hexapawn is a simple turn based game played on a 3 × 3 board. Each player begins with 3 pawns - WHITE (MAX) in the bottom row and BLACK (MIN) in the top row. Pawns can move as normal in chess (i.e. white pawns can move up one square or can capture a…