Class SnakeGeneticConstants


  • public final class SnakeGeneticConstants
    extends Object
    This class keep some Evaluation constant value
    Version:
    Summer 2021
    • 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
    • Constructor Detail

      • SnakeGeneticConstants

        private SnakeGeneticConstants()
        Private constructor because this is a utility class
    • 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