Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7817121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:07:31+00:00 2026-06-02T06:07:31+00:00

The alpha-beta pruning algorithm is as follows: function ALPHA-BETA-SEARCH(state) returns an action v <-

  • 0

The alpha-beta pruning algorithm is as follows:

function ALPHA-BETA-SEARCH(state) returns an action
      v <- MAX-VALUE(state, -∞, +∞)
      return the action in ACTIONS(state) with value v

function MAX-VALUE(state, α, β) returns a utility value
    if TERMINAL-TEST(state) then 
        return UTILITY(state)
    v <- -∞
    for each a in ACTIONS(state) do
        v <- MAX(v, MIN-VALUE(RESULT(state, a), α, β))
        if v ≥ β then
            return v
        α <- MAX(α, v)
    return v

function MIN-VALUE(state, α, β) returns a utility value
    if TERMINAL-TEST(state) then 
        return UTILITY(state)
    v <- +∞
    for each a in ACTIONS(state) do
        v <- MIN(v, MAX-VALUE(RESULT(state, a), α, β))
        if v ≤ α then 
            return v
        β <- MIN(β, v)
    return v

The algorithm states that the ACTIONS function will give a list of all the available actions in a given state.

Let’s e.g. take the game of checkers. Suppose that one checker, say A, is in diagonal with another checker, say B. If A can take B, then that is an (unavoidable, since we must take the other checker, if we can) action. Or, if there are multiple takes, these are all actions. This situation can actually be drawn using pencil and paper. More specifically, the situation could be represented using a tree, where each node represents a state and the edges to its child nodes represent the possible actions from that state.

I think you don’t need to explicitly store a tree data structure. However, the algorithm above contains the following statement: return the action in ACTIONS(state) with value v. Now, the ACTIONS(state) will return the possible actions from a certain state (e.g. where A needs to play).

If we work out all the algorithm, we will get a value v, and we will follow the node with the value v that is passed from the terminal node.

Now, suppose I do not store the full tree of all possible moves or actions from every state. When return the action ACTIONS(state) with the value v is executed, I will only get the actions that lead me to the next state, and I know that one of the actions leads me to the best possible path. But, if I don’t have extra bookkeeping, e.g. the full tree, will I be able to match the actions with the value v?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:07:33+00:00Added an answer on June 2, 2026 at 6:07 am

    You shouldn’t build an explicit tree structure in a minimax algorithm, and in practical situations, you can’t. A minimax algorithm with a depth bound d and a branching factor b traverse a tree that is O(dᵇ) nodes large, which very soon gets too large to store. (In the version you posted, there isn’t even a depth bound, meaning that you would generate the entire game tree.)

    The way to keep track of the state is to rewrite the top-level ALPHA-BETA-SEARCH as

    function ALPHA-BETA-SEARCH(state) returns an action
        best_a <- nil
        max_v <- -∞
        for each a in actions(state)
            v <- MIN-VALUE(RESULT(state, a), +∞, max_v)
            if v > max_v then
                max_v <- v
                best_a <- a
        return best_a
    

    That is, you “unroll” the top call to MAX-VALUE in the main function.

    Note that, in the function above, you’re looping over each action a, computing their v. When a certain v is the maximum you’ve found so far, you know that the action you computed it from is currently the best_a.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a Reversi player using the standard alpha beta pruning search algorithm. I'm
I am doing a game tree search with alpha beta pruning in a game
Can the minimax algorithm with alpha-beta pruning yield a different answer than minimax without
I have a basic implementation of alpha-beta pruning but I have no idea how
I'm writing a Othello engine using minimax with alpha-beta pruning. It's working ok, but
Shouldn't it return a DRAW? def alphabeta(alpha, beta, player) best_score = -INFINITY if not
I am currently writing a checker program which uses alpha-beta pruning and a heuristic
My code is: #include <boost/regex.hpp> boost::cmatch matches; boost::regex_match(alpha beta, matches, boost::regex(([a-z])+)); cout << found:
I have this lines: alpha: beta beta: alpha, beta omega: beta, gamma, alpha gamma:
I need to begin a branch (beta) based in another branch (alpha), you can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.