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

Alpha-beta pruning in python

I'm trying to implement a computer player in a Connect Four type game. Alpha-beta pruning seemed like the best way to achieve this, but I cannot seem to figure out what I'm doing wrong. The following is the code I've come up with. It starts with a…
0
votes
1 answer

MinMax with Alpha-Beta Pruning

How can MinMax with Alpha-Beta Pruning be applied to the game Stratego? Can you simulate how it works. Thank you!
0
votes
1 answer

How should I do with evaluation function in minimax?

I want to implement PacMan game with minimax algorithm but I do not understand the meaning of algorithm fluently. I have written this code public MOVE miniMax(Game game,Node[] nodes,int depth,Boolean pacMan){ int value; MOVE…
user2944170
0
votes
1 answer

Tic Tac Toe implements with min - max method with alfa-beta pruning is there any better solution?

There is a code implements function which assigned every status a value (both parts of min-max method) Procedure TGraph.Rate(const AState: TState); Var i: integer; Begin //hodnotí stav if AState.Children.Count > 0 then begin //není list if…
0
votes
1 answer

Tic Tac Toe Minimax Algorithm returning empty boards

I've been struggling with implementing a miniMax algorithm for a Tic tac toe AI for a couple of days now. Right now, the problem I'm getting is that I get an empty board in the 'returnBoard' input when I call the minimax() function. I know that my…
user3126362
0
votes
1 answer

MiniMax Algorithm for Tic Tac Toe failure

I'm trying to implement a minimax algorithm for tic tac toe with alpha-beta pruning. Right now I have the program running, but it does not seem to be working. Whenever I run it it seems to input garbage in all the squares. I've implemented it so…
user3126362
0
votes
1 answer

Function does not return negative value

I am doing a small project on 4x4 tic-tac-toe game. I am using Alpha Beta Search for finding the next best move. In the alpha beta search, I am using a cutoff evaluation function that is being called in "utility" function of the following…
Gopikrishna S
  • 2,221
  • 4
  • 25
  • 39
0
votes
2 answers

Can pruning be implemented in the expectiminimax algorithm?

I'm current using the expectiminimax algorithm, which is working great in my current situation: max -> min -> chance -> max -> min -> chance -> (repeat) I cannot in any way do max/min -> Chance -> (repeat) due to way the game works. I feel as…
0
votes
1 answer

Implementing Alpha Beta into Minimax

I'm trying to add Alpha Beta pruning into my minimax, but I can't understand where I'm going wrong. At the moment I'm going through 5,000 iterations, where I should be going through approximately 16,000 according to a friend. When choosing the first…
Matt
  • 175
  • 2
  • 12
0
votes
1 answer

alpha/beta pruning, from which perspective should the evaluation be performed?

I'm trying to develop a chess program. It will be regular bruteforce searching of a tree, the only thing different will be the evaluation. Initially I will use a standard evaluator as designed by Claude Shannon so that it is more easy to test if it…
Folkert van Heusden
  • 433
  • 4
  • 17
  • 38
0
votes
0 answers

Tic tac toe evaluation error

I try to make tic-tac-toe with different board size and pieces to win. I have evaluation function which depends on open paths. For example if we have O--X O--- --O We get 10^2 ( for vertical first column ) + 10^1 (vertical second column) + 10^1…
Karol_P
  • 265
  • 1
  • 3
  • 10
0
votes
2 answers

How to implement efficient Alpha-Beta pruning Game Search Tree?

I'm trying to learn about artificial intelligence and how to implement it in a program. The easiest place to start is probably with simple games (in this case Tic-Tac-Toe) and Game Search Trees (recursive calls; not an actual data structure). I…
0
votes
2 answers

Track best move from Minimax

I know this kind of question has been asked before, but i was unable to solve my doubts. I have a simple Othello Engine (it plays very well actually), that uses the class below to get the best move: import java.util.*; import…
Fernando
  • 7,785
  • 6
  • 49
  • 81
0
votes
1 answer

Issue with MiniMax to Alpha-Beta Search Conversion

OK, my issue should sound pretty familiar to anyone who has played with board game programming, so here it is : I've implemented a variation of the MiniMax algorithm (returning moves instead of min/max values). I've also tried setting it up as an…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
0
votes
0 answers

Python: Alpha Beta Minimax for Connect 4

I'm trying to implement an AI using minimax in Python for Connect 4 as a personal project. Currently I have this. def alphaBeta(myBoard, column, depth, alpha, beta, player): parent = board() for r in range(ROWS): for c in…