org.eviline.ai
Class Context

java.lang.Object
  extended by org.eviline.ai.Context
Direct Known Subclasses:
QueueContext

public class Context
extends Object

A decision context. Contains the original Field, a copy of the field with impossible areas marked, and some book-keeping info. There is one Context at each node in the decision tree.

Author:
robin

Field Summary
 AIKernel ai
           
 DecisionModifier decisionModifier
          The decision modifier in use for this context.
 ShapeType omit
          The ShapeType to omit from the decision.
 Field original
          The original Field based on which a decision is to be made
 Field paintedImpossible
          The original Field (see original) but painted impossible.
 int remainingDepth
          The remaining decision depth at this context in the decision tree.
 
Constructor Summary
Context(AIKernel ai, DecisionModifier decisionModifier, Field original, int remainingDepth)
          Create a new Context.
 
Method Summary
 Context deeper(Field deeperOriginal)
          Construct a Context that is a copy of this one, but for use at one level deeper in the decision tree.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ai

public AIKernel ai

decisionModifier

public DecisionModifier decisionModifier
The decision modifier in use for this context.


original

public Field original
The original Field based on which a decision is to be made


paintedImpossible

public Field paintedImpossible
The original Field (see original) but painted impossible. (see AbstractFitness.paintImpossibles(Field))


remainingDepth

public int remainingDepth
The remaining decision depth at this context in the decision tree.


omit

public ShapeType omit
The ShapeType to omit from the decision.

Constructor Detail

Context

public Context(AIKernel ai,
               DecisionModifier decisionModifier,
               Field original,
               int remainingDepth)
Create a new Context.

Parameters:
decisionModifier -
original -
remainingDepth -
Method Detail

deeper

public Context deeper(Field deeperOriginal)
Construct a Context that is a copy of this one, but for use at one level deeper in the decision tree.

Parameters:
deeperOriginal -
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.