Class SnakeGeneticConstants
- java.lang.Object
-
- ai.nettogrof.battlesnake.snakes.common.SnakeGeneticConstants
-
public final class SnakeGeneticConstants extends Object
This class keep some Evaluation constant value- Version:
- Summer 2021
-
-
Field Summary
Fields Modifier and Type Field Description private static floatborderScoreBorder score to subtract if head on the border of the boardprivate static intfoodValueAreaValue if a FOOD is found in the controlled AREAprivate static floathazardScoreHazard score to subtract if head in hazardprivate static com.google.common.flogger.FluentLoggerLOGLoggerprivate static floatmctsBiasThe Bias value for the Monte-Carlo Tree Searchprivate static floatsizeAdvantagescore to add/subtract in snake length comparisonprivate static floatstopExpandLimitStop expand a node when the score ratio is higher than that valueprivate static inttailValueAreaValue if a tail is found in the controlled AREA
-
Constructor Summary
Constructors Modifier Constructor Description privateSnakeGeneticConstants()Private constructor because this is a utility class
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static floatgetBorderScore()static intgetFoodValueArea()static floatgetHazardScore()static floatgetMctsBias()static floatgetSizeAdvantage()static floatgetStopExpandLimit()static intgetTailValueArea()static voidloadEvaluationValue()Load evaluation properties to get genetic valuestatic voidsetBorderScore(float border)Set Border scorestatic voidsetFoodValue(int foodValue)Set Food Valuestatic voidsetHazardScore(float hazard)set Hazard score for evalutionstatic voidsetMCTS(float newMctsBias)Set mcts biasstatic voidsetSizeAdvantage(float sizeAdvantage)Set the size advantagestatic voidsetStopExpandLimit(float sel)set stop expand liststatic voidsetTailValueArea(int tailValue)Set tail value
-
-
-
Field Detail
-
LOG
private static final com.google.common.flogger.FluentLogger LOG
Logger
-
stopExpandLimit
private static float stopExpandLimit
Stop expand a node when the score ratio is higher than that value
-
foodValueArea
private static int foodValueArea
Value if a FOOD is found in the controlled AREA
-
tailValueArea
private static int tailValueArea
Value if a tail is found in the controlled AREA
-
borderScore
private static float borderScore
Border score to subtract if head on the border of the board
-
sizeAdvantage
private static float sizeAdvantage
score to add/subtract in snake length comparison
-
hazardScore
private static float hazardScore
Hazard score to subtract if head in hazard
-
mctsBias
private static float mctsBias
The Bias value for the Monte-Carlo Tree Search
-
-
Method Detail
-
setFoodValue
public static void setFoodValue(int foodValue)
Set Food Value- Parameters:
foodValue- the fOOD_VALUE_AREA to set
-
setTailValueArea
public static void setTailValueArea(int tailValue)
Set tail value- Parameters:
tailValue- the tail value to set
-
setBorderScore
public static void setBorderScore(float border)
Set Border score- Parameters:
border- the bORDER_SCORE to set
-
setHazardScore
public static void setHazardScore(float hazard)
set Hazard score for evalution- Parameters:
hazard- the hazardScore to set
-
setMCTS
public static void setMCTS(float newMctsBias)
Set mcts bias- Parameters:
newMctsBias- the mCTS_BIAS to set
-
setStopExpandLimit
public static void setStopExpandLimit(float sel)
set stop expand list- Parameters:
sel- Stop Expand Limit
-
getStopExpandLimit
public static float getStopExpandLimit()
- Returns:
- the stopExpandLimit
-
getFoodValueArea
public static int getFoodValueArea()
- Returns:
- the foodValueArea
-
getTailValueArea
public static int getTailValueArea()
- Returns:
- the tailValueArea
-
getBorderScore
public static float getBorderScore()
- Returns:
- the borderScore
-
getHazardScore
public static float getHazardScore()
- Returns:
- the hazardScore
-
getMctsBias
public static float getMctsBias()
- Returns:
- the mctsBias
-
getSizeAdvantage
public static float getSizeAdvantage()
- Returns:
- the size Advantage value
-
setSizeAdvantage
public static void setSizeAdvantage(float sizeAdvantage)
Set the size advantage- Parameters:
sizeAdvantage- size advantage value
-
loadEvaluationValue
public static void loadEvaluationValue()
Load evaluation properties to get genetic value
-
-