|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eviline.ai.DefaultAIKernel
public class DefaultAIKernel
Class which holds the AI algorithms. These algorithms are documented in the associated methods.
Constructor Summary | |
---|---|
DefaultAIKernel()
|
Method Summary | |
---|---|
protected Map<PlayerActionNode,List<PlayerAction>> |
allPathsFrom(Field field)
|
Decision |
bestFor(Context context)
Determine the shape that would be best for the player |
Decision |
bestFor(Context context,
ShapeType type)
Determine the best way for a player to play a single shape. |
Decision |
bestFor(Field inPlayField)
|
Decision |
bestFor(QueueContext context)
Determine the best way for a player to play a particular queue of shapes. |
AbstractFitness |
getFitness()
|
boolean |
isHardDropOnly()
|
boolean |
isHighGravity()
|
protected List<PlayerAction> |
pathsTo(Field field,
PlayerActionNode dest)
|
Decision |
planBest(Context context,
Decision defaultDecision)
Determine the shape that would be best for the player |
Decision |
planWorst(Context context,
Decision defaultDecision)
Determine the shape that would be worst for the player |
void |
setFitness(Fitness fitness)
|
void |
setHardDropOnly(boolean hardDropOnly)
|
void |
setHighGravity(boolean highGravity)
|
Decision |
worstFor(Context context)
Determine the shape that would be worst for the player |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAIKernel()
Method Detail |
---|
protected Map<PlayerActionNode,List<PlayerAction>> allPathsFrom(Field field)
protected List<PlayerAction> pathsTo(Field field, PlayerActionNode dest)
public Decision bestFor(QueueContext context)
bestFor
in interface AIKernel
context
-
public Decision bestFor(Context context, ShapeType type)
bestFor
in interface AIKernel
context
- type
-
public Decision bestFor(Field inPlayField)
bestFor
in interface AIKernel
public Decision bestFor(Context context)
bestFor
in interface AIKernel
context
-
public Decision planBest(Context context, Decision defaultDecision)
planBest
in interface AIKernel
context
- defaultDecision
-
public Decision worstFor(Context context)
worstFor
in interface AIKernel
context
-
public Decision planWorst(Context context, Decision defaultDecision)
planWorst
in interface AIKernel
context
- defaultDecision
-
public boolean isHighGravity()
public void setHighGravity(boolean highGravity)
public boolean isHardDropOnly()
public void setHardDropOnly(boolean hardDropOnly)
public AbstractFitness getFitness()
getFitness
in interface AIKernel
public void setFitness(Fitness fitness)
setFitness
in interface AIKernel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |