Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: C and Cpp Games and Entertainment MiniMax Game Trees Tutorial

Learn about coding a decision-making program.

Tutorial Details:

Entertainment MiniMax Game Trees

The Minimax Game Tree is used for programming computers to play games in which there are two players taking turns to play moves. In the most basic sense, the minimax tree is just a tree of all possible moves. For instance, take a look at the following minimax tree of all the possible first two moves of Tic-Tac-Toe (the tree has been simplified by removing symmetrical positions).

Notice that unlike other trees like binary trees, 2-3 tres, and heap trees, a node in the minimax game tree can have any number of children, depending on the game situation.

The tree above has three levels, but in programming, the levels of a minimax tree are commonly refered to as plies . At each ply, the opportunity to play (the "turn") switches to the other player. The two different players are usually refered to as Max and Min (this convention will be explained shortly).

With a full minimax tree, the computer could look ahead for each move to determine the best possible move. Of course, as you can see in the example diagram, the tree can get very big with only a few moves, and to look even just five moves ahead can quickly overwhelm a simple computer . Thus, for large games like Chess and Go, computer programs are forced to estimate who is winning or losing by sampling just a small portion of the entire tree. Also, programmers have come up with algorithms such as Alpha-Beta pruning, Negascout, and MTD(f) to try to limit the number of nodes the computer must examine.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
C and Cpp Games and Entertainment MiniMax Game Trees Tutorial

View Tutorial:
C and Cpp Games and Entertainment MiniMax Game Trees Tutorial

Related Tutorials:

Solve real problems with aglets, a type of mobile agent - JavaWorld May 1997
Solve real problems with aglets, a type of mobile agent - JavaWorld May 1997
 
Java Tip 85: Fun and games with JFileChooser - JavaWorld
Java Tip 85: Fun and games with JFileChooser - JavaWorld
 
JavaWorld article about JavaCC
JavaWorld article about JavaCC
 
Make room for JavaSpaces, Part 3 - JavaWorld March 2000
Make room for JavaSpaces, Part 3 - JavaWorld March 2000
 
J2ME: The next major games platform? - JavaWorld March 2001
J2ME: The next major games platform? - JavaWorld March 2001
 
Talking Java! - JavaWorld August 2001
Talking Java! - JavaWorld August 2001
 
Sir, what is your preference?
Sir, what is your preference?
 
Let the mobile games begin, Part 2
Let the mobile games begin, Part 2
 
An AI tool for the real world
An AI tool for the real world
 
The J2EE 1.4 Tutorial
The J2EE 1.4 Tutorial is a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial.
 
Navigate through virtual worlds using Java 3D
Navigate through virtual worlds using Java 3D
 
Develop state-of-the-art mobile games
Develop state-of-the-art mobile games
 
Eye Of Newt - LDAP Editor
Eye Of Newt - LDAP Editor
 
An Intelligent Nim Computer Game, Part 1
An Intelligent Nim Computer Game, Part 1 In this article, you learn how to play Nim, and discover tools for creating an intelligent computer player. In the next article, you apply those tools to the creation of that player, while building console and G
 
Jeff Schmitt's JDBC Page
This tutorial assumes you are using the MySQL database and the GWE JDBC drivers. The host computer is triton.towson.edu.
 
JavaServer Pages Technology - Documentation
Sun's tutorial for Java Server Pages that provide a good introduction to design web pages with JSP.
 
Game Canvas Basics
Introduces the MIDP 2.0 GameCanvas class and the game loop concept. Required reading for all aspiring "first person shooter" developers.
 
10 Minutes Guide to Ant
10 Minutes Guide to Ant 10 Minutes Guide to Ant Previous Tutorial Index Next Introduction Well for the next 10 minutes get ready to devote to the ant guide. This will make some sence to the ant. Ant is a free tool under GNU Licence and is
 
Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0 Building Web Application With Ant and Deploying on Jboss 3.0 Previous Tutorial Index Next In this lesson I will show you how to build you web application and install on the Jboss 3.0
 
Buy Peanut 9.6 Linux in India from us. Peanut 9.6 distribution is available in India.
Buy Peanut 9.6 Linux in India from us. Peanut 9.6 distribution is available in India. Peanut 9.6 Linux Now Available Peanut 9.6 Linux CD It is a Linux OS (operating system), especially made for those new to Linux. This is the most POWERFUL and
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.