net.sf.colossus.client
Class PredictSplits

java.lang.Object
  extended by net.sf.colossus.client.PredictSplits

public final class PredictSplits
extends java.lang.Object

Predicts splits for one enemy player, and adjusts predictions as creatures are revealed.

Author:
David Ripton See docs/SplitPrediction.txt

Nested Class Summary
(package private)  class PredictSplits.ReverseIntegerComparator
           
 
Field Summary
private static java.util.logging.Logger LOGGER
           
private  NodeTurnComparator nodeTurnComparator
           
private  PredictSplitNode root
           
 
Constructor Summary
PredictSplits(java.lang.String rootId, java.util.List<CreatureType> creatureTypes, Variant variant)
           
 
Method Summary
(package private)  PredictSplitNode getLeaf(java.lang.String markerId)
          Return the leaf PredictSplitNode with matching markerId.
(package private)  java.util.List<PredictSplitNode> getLeaves(PredictSplitNode node)
          Return all non-empty childless nodes in subtree starting from node.
(package private)  java.util.List<PredictSplitNode> getNodes(PredictSplitNode node)
          Return all non-empty nodes in subtree starting from node.
 PredictSplitNode getRoot()
           
(package private)  void printLeaves()
          Print all childless nodes in tree.
(package private)  void printNodes()
          Print all nodes in tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER

root

private final PredictSplitNode root

nodeTurnComparator

private final NodeTurnComparator nodeTurnComparator
Constructor Detail

PredictSplits

PredictSplits(java.lang.String rootId,
              java.util.List<CreatureType> creatureTypes,
              Variant variant)
Method Detail

getLeaves

java.util.List<PredictSplitNode> getLeaves(PredictSplitNode node)
Return all non-empty childless nodes in subtree starting from node.


getNodes

java.util.List<PredictSplitNode> getNodes(PredictSplitNode node)
Return all non-empty nodes in subtree starting from node.


printLeaves

void printLeaves()
Print all childless nodes in tree.


printNodes

void printNodes()
Print all nodes in tree.


getLeaf

PredictSplitNode getLeaf(java.lang.String markerId)
Return the leaf PredictSplitNode with matching markerId.


getRoot

public PredictSplitNode getRoot()