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

Problem implementing alpha-beta pruning for chess engine

I have been working on a chess engine recently, and I am ready to implement some kind of AI to actually play the game (search positions). I have written an alpha-beta pruning algorithm, but it doesn't return the best moves when i test it. The code…
0
votes
1 answer

Alpha-beta pruning with transposition tables

I don't get why flags for table entries are used as they are. Consider e.g. the pseudocode for Negamax with alpha-beta pruning and transposition tables and concentrate on the TT parts. (* Transposition Table Lookup; node is the lookup key for…
0
votes
0 answers

How to expand recursively a game tree

I'm implementing a card game in java, however i cannot expand efficiently the game tree in order for computer to execute MiniMax algorithm on it, here is the code: public void BuildTree(Stato State,int depth) { if(depth < 0) { …
0
votes
1 answer

Is it possible to apply alpha-beta pruning for non0zero sum games with 2 players?

I understand why it is possible for zero-sum game, but I cannot understand whether it is possible for non-zero sum games with 2 players. Is it because both players do not necessarily have a conflict in their interests?
0
votes
1 answer

Can a cache be used for an alpha-beta search algorithm?

I'm working on a minimax tic-tac-toe algorithm. I got it working fine, caching each state in the tree. Then I implemented alpha-beta pruning, which seemed to affect the game. I think the problem is that nodes cannot be "trusted" if any of their…
0
votes
1 answer

What is going wrong with my Minimax Algorithm?

I tried to make a MiniMax AI using a tutorial, The AI doesn't work and just goes on the bottom row and build up each time, reporting a column index of 0, 1, 2, 3, 4, 5, 6 and then for the next row and so on. The only thing I managed to find a lot…
0
votes
0 answers

Javascript Connect 4 Minimax and Alpha-Beta Pruning not working

I am attempting to program Connect 4, using a minimax AI algorithm and alpha-beta pruning. This is the entire code, but the three functions where I believe the problem may lie in are bestMove(), minimax(), and useHeuristic(). I apologize in advance…
0
votes
1 answer

Parallelizing Minimax with alpha-beta pruning using MPI

I am currently busy with a project that requires you to use the minimax with AB pruning. I have successfully implemented a serial version of the program //Assume maximizing player is WHITE int minimax_move(int *current_board, int player, int…
it2901
  • 69
  • 8
0
votes
1 answer

usage of heuristic function in alpha beta pruning

While solving an alpha beta pruning algorithm, how does a heuristic function help to prune as many nodes as possible? If in the worst case, no nodes got pruned, how to prune them using heuristic function?
0
votes
1 answer

Solving Alpha beta pruning from right to left

What is the efficient way to solve an Alpha beta pruning algorithm? will it be efficient to visit the nodes from (right to left) or (left to right) ? and the reason?
0
votes
0 answers

alpha beta pruning algorithm for position comparsion

I've developed NN model that takes two chess positions and estimates which one is better from whites' perspective acording to that article: https://www.cs.tau.ac.il/~wolf/papers/deepchess.pdf Author writes about alpha beta pruning algorithm but he…
0
votes
1 answer

How would I find the optimal node when using Minimax with Alpha-Beta Pruning

I am trying to make a chess engine, the basic idea is that when I click a button the computer makes a move. Here's my code: def alphabeta(board, node, depth, a, b, maximizer): if depth == 0: return evaluate.node(node) if maximizer…
0
votes
1 answer

No performance increase with Alpha-Beta pruning in Minimax algorithm

I am trying to implement alpha-beta pruning into my chess engine, but there are no performance differences, what could I be doing wrong? I tried console logging how many times the algorithm cuts a branch, but it was in the order of hundreds so it…
Crupeng
  • 317
  • 2
  • 14
0
votes
1 answer

Why do we store only two or three killer moves per depth?

I am implementing a chess engine, and my move ordering scheme works as follows Use pvmove Use most valuable victim least valuable attacker Use killer heuristics Though I don't get why I should be storing only 2 or 3 moves per depth, when I can…
0
votes
0 answers

Minimax algorithm stuck in an infinite loop

So I have beating my head at this problem for a while. I am trying to implement the minimax algorithm to play a game called mancala. As far as I can tell my code should work but for some reason when the function calls itself recursively it keeps on…
Omri Ram
  • 37
  • 1
  • 7