background preloader

Artificial Intelligence

Facebook Twitter

Alpha–beta pruning. History[edit] Improvements over naive minimax[edit] An illustration of alpha–beta pruning. The grayed-out subtrees need not be explored (when moves are evaluated from left to right), since we know the group of subtrees as a whole yields the value of an equivalent subtree or worse, and as such cannot influence the final result.

The max and min levels represent the turn of the player and the adversary, respectively. The benefit of alpha–beta pruning lies in the fact that branches of the search tree can be eliminated. This way, the search time can be limited to the 'more promising' subtree, and a deeper search can be performed in the same time. . An animated pedagogical example that attempts to be human-friendly by substituting initial infinite (or arbitrarily large) values for emptiness and by avoiding using the negamax coding simplifications. Pseudocode[edit] Heuristic improvements[edit] Other algorithms[edit] See also[edit] References[edit] George T. External links[edit] Java tree data-structure. Www.din.uem.br/~jmpinhei/IA-CC/08RedesSemanticasEFrames.pdf.

A* search. A* Pathfinding for Beginners. By Patrick Lester (Updated July 18, 2005) This article has been translated into Albanian, Chinese, Finnish, German, Greek, Korean, Polish, Portuguese, Romanian, Russian, Serbian, and Spanish. Other translations are welcome. See email address at the bottom of this article. The A* (pronounced A-star) algorithm can be complicated for beginners. This article does not try to be the definitive work on the subject.

Finally, this article is not program-specific. But we are getting ahead of ourselves. Introduction: The Search Area Let’s assume that we have someone who wants to get from point A to point B. [Figure 1] The first thing you should notice is that we have divided our search area into a square grid. These center points are called “nodes”. Starting the Search Once we have simplified our search area into a manageable number of nodes, as we have done with the grid layout above, the next step is to conduct a search to find the shortest path. We begin the search by doing the following: where 1. Step by Step: Alpha Beta Pruning.