vooga.aiEngine.Algorithms
Class ExpectiMinimax

java.lang.Object
  extended by vooga.aiEngine.Algorithms.AbstractAlgorithm
      extended by vooga.aiEngine.Algorithms.ExpectiMinimax

public class ExpectiMinimax
extends AbstractAlgorithm

ExpectiMinimax.java

Author:
Cody Freeman Drawing from Russell & Norvig's "Artificial Intelligence - A Modern Approach", 3rd ed. The Expectiminimax algorithm operates in the same manner as the Minimax algorithm, with the addition of a percentage map tied to all possible courses of action. Note - this is purely for reference and demonstrates an incredibly idealized input. In this case, the AIController is sending in five TreeMaps of integers listed to TreeMaps tying event names to their relative likelihoods. The integers represent points in time, and the treemaps within treemaps represent the odds of carrying out particular actions. This algorithm may be adapted for games with relatively small ranges of moves, as this is not as time-efficient as algorithms like TrackHeight.

Constructor Summary
ExpectiMinimax()
           
 
Method Summary
 void changehumanPercentages(java.util.TreeMap<java.lang.String,java.lang.Double> input)
           
 void changemyPercentages(java.util.TreeMap<java.lang.String,java.lang.Double> input)
           
 void perform(java.lang.Object... args)
          Performs an arbitrary algorithm with arbitrary parameters.
 java.lang.String process(java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> myPastOdds, java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> humanOdds, java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> humanPastOdds, java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> humanValues, boolean CPUstarts, boolean CPUwantsmin, int iterations)
           
 
Methods inherited from class vooga.aiEngine.Algorithms.AbstractAlgorithm
performWithDelay, setDelay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpectiMinimax

public ExpectiMinimax()
Method Detail

changemyPercentages

public void changemyPercentages(java.util.TreeMap<java.lang.String,java.lang.Double> input)

changehumanPercentages

public void changehumanPercentages(java.util.TreeMap<java.lang.String,java.lang.Double> input)

process

public java.lang.String process(java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> myPastOdds,
                                java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> humanOdds,
                                java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> humanPastOdds,
                                java.util.TreeMap<java.lang.Integer,java.util.TreeMap<java.lang.String,java.lang.Double>> humanValues,
                                boolean CPUstarts,
                                boolean CPUwantsmin,
                                int iterations)

perform

public void perform(java.lang.Object... args)
             throws java.lang.RuntimeException
Description copied from class: AbstractAlgorithm
Performs an arbitrary algorithm with arbitrary parameters. Defines the basic parameters of an algorithm. Algorithms generally require a number of EventObjects which the algorithm fires according to certain specifications.

Specified by:
perform in class AbstractAlgorithm
Throws:
java.lang.RuntimeException