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
0 answers

How long should it take a perft function to search a chess position 3 nodes deep?

I made a perft function to test the speed of my chess engine, and the function takes 205 seconds (>2 minutes) to go 3 ply deep and evaluate all the leaves (~42,000 leaves, because 35^3 = 42,000). Is this slowness supposed to happen? It's only 42,000…
0
votes
1 answer

Attempts to use Alpha-Beta Search for Real-Time Games?

The Min-Max search, as well as the more efficient Alpha-Beta search algorithm are well known and often used to implement an artificial intelligence (AI) player in games like tic-tac-toe, connect 4 and so on. While AIs based on these search…
0
votes
0 answers

Implement ultimate tic-tac-toe but winning in one sub board ends the game

I am trying to make an ultimate tic-tac-toe game in python which is a little different than the actual one in a way that this game ends when there is a win in any one sub-board. I am using minimax algorithm with alpha-beta pruning to find out the…
Akhil Jain
  • 71
  • 1
  • 11
0
votes
1 answer

Is it possible to use alpha-beta pruning for non-zero-sum games with more than two players?

I have read somewhere that the minimax algorithm can be generalized for more than two players. Imagine that we have 3 players that each of them want to maximize its own answer. Is it possible to use alpha-beta pruning in this case? or it is useless?…
Mostafa Ghadimi
  • 5,883
  • 8
  • 64
  • 102
0
votes
1 answer

Minimal example of fail-soft alpha-beta game tree including a fail-low

While studying the fail-soft alpha-beta algorithm I'm struggling to come up with a minimal game tree which, when solved with fail-soft alpha-beta produces a fail-low which is different to the minimax value. For example. Let the initial alpha and…
0
votes
1 answer

Multithreaded evaluation using Negamax + alpha-beta pruning with transposition tables

I just implemented a nice-working evaluation function for checkers. Current implementation uses threads and separate transposition tables for each. I spawn a thread for every move that is available in the root node (initial board position) and then…
user1880342
  • 128
  • 10
0
votes
1 answer

sorting move before alpha beta pruning - tic tac toe - python

I have the negascout or principal variation search algorithms working fine to solve tic tac toe. I have read somewhere that for these algorithms to be most efficient it is important to sort the moves such that the search starts with what is likely…
JSB
  • 1
  • 2
0
votes
1 answer

Alpha Beta Pruning with Binary Search Tree

I am working through the Minimax algorithm with Alpha-Beta Pruning example found here. In the example, they use an array to implement the search tree. I followed the example, but also tried implementing it with a binary search tree as well. Here are…
JustBlossom
  • 1,259
  • 3
  • 24
  • 53
0
votes
0 answers

Heuristics for 3D tic-tac-toe

Currently I'm trying to implement heuristics for a 3D tic-tac-toe but it seems like my counter is way of it,f but I'm unsure where I've done wrong, I'm not gonna post all of the code since it's a lot, but here is a part: public void…
A.Maine
  • 117
  • 9
0
votes
1 answer

Minimax Alpha Beta Pruning Algorithm takes too much time to solve Tic Tac Toe (10x10 board)

I made a Tic Tac Toe game of two types in Javascript. One is 3x3, and the other one is 10x10. I am using Minimax algorithm with Alpha Beta Pruning to solve both the games. In 3x3, where the game tree is really small, the algorithm works fine. But in…
0
votes
1 answer

Alpha Beta pruning does not seem to improve my chess minimax performance

import java.util.ArrayList; import java.util.HashMap; public class MiniMax { public static final int SUGGESTIVE_MAX_DEPTH = 10; public static int counter; //AI (white), depth>0 public static int[] getComputerMove(Board b, int…
Andy Chen
  • 1
  • 1
0
votes
0 answers

AlphaBeta with TT (MTD-f)

My question is about TTalphabeta. In MTD-f's paper (https://people.csail.mit.edu/plaat/mtdf.html) the implementation of alpha beta is quite different from other I found (https://homepages.cwi.nl/~paulk/theses/Carolus.pdf) What is the difference…
Ludvins
  • 1
  • 1
0
votes
1 answer

Why is Minimax with Alpha-Beta pruning expanding more nodes on the second turn of Connect Four?

I have a program which plays Connect Four against a human opponent using either standard Minimax algorithm or minimax with alpha-beta pruning. Both algorithms have a depth limit, after which they apply an evaluation function. As part of the project…
RicardoC
  • 109
  • 1
  • 2
  • 9
0
votes
0 answers

Can't add depth limit to minimax with alpha-beta pruning

I have a minimax algorithm with alpha beta pruning for tic-tac-toe. I have trouble adding a depth limit to how minimax evatuates the board. When I add a depth limit it only partially works. For example, if I move first in the middle, it will choose…
Zuse
  • 93
  • 1
  • 11
0
votes
1 answer

Difficulty implementing Alpha-beta pruning to minimax algorithm

I'm having some difficulty getting Alpha-beta pruning to work correctly. I've got a functional Minimax algorithm, which I've tried to adapt, but to no avail. I used the example on Wikipedia Currently, the algorithm seems to run as expected for the…
Lich
  • 10
  • 1
  • 2