Class RoyaleFourNode
- java.lang.Object
-
- ai.nettogrof.battlesnake.treesearch.node.AbstractNode
-
- ai.nettogrof.battlesnake.treesearch.node.AbstractDecisionNode
-
- ai.nettogrof.battlesnake.treesearch.node.AbstractEvaluationNode
-
- ai.nettogrof.battlesnake.treesearch.search.royale.AbstractRoyaleNode
-
- ai.nettogrof.battlesnake.treesearch.search.royale.RoyaleFourNode
-
public class RoyaleFourNode extends AbstractRoyaleNode
This Royale FourNode class must be use when only 3 or 4 snakes left, and in royale mode.- Version:
- Spring 2021
- Author:
- carl.lajeunesse
-
-
Field Summary
Fields Modifier and Type Field Description private static int
FOUR
-
Fields inherited from class ai.nettogrof.battlesnake.treesearch.node.AbstractNode
allChildsCount, boardInfo, child, exp, food, hazard, ONE, possibleMove, score, scoreRatio, snakes
-
-
Constructor Summary
Constructors Constructor Description RoyaleFourNode(List<SnakeInfo> snakes, FoodInfo foodInfo, AbstractHazard hazard, BoardInfo boardInfo)
Constructor, set the information and evaluate/ set score directly
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractNode
createNode(List<SnakeInfo> snakeInfo, AbstractNode currentNode)
Uses to create fourNode typeprivate void
setScore()
Sets the node score-
Methods inherited from class ai.nettogrof.battlesnake.treesearch.search.royale.AbstractRoyaleNode
adjustHazardScore, adjustScodeBasedonBoardControl, getHazard, initBoard, listAreaControl
-
Methods inherited from class ai.nettogrof.battlesnake.treesearch.node.AbstractEvaluationNode
addBasicLengthScore, addScoreDistance, addScoreDistanceAll, addSizeCompareScore, addToHash, applyNewHash, generateHash, setWinnerMaxScore
-
Methods inherited from class ai.nettogrof.battlesnake.treesearch.node.AbstractDecisionNode
countSnakeAlive, updateScore
-
Methods inherited from class ai.nettogrof.battlesnake.treesearch.node.AbstractNode
addChild, getBoardInfo, getChild, getChildCount, getFood, getScoreRatio, getSnakes, isExp, isSingleSnake, setExp, setPossibleMove, updateChildCount, updateScoreRatio
-
-
-
-
Field Detail
-
FOUR
private static final int FOUR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RoyaleFourNode
public RoyaleFourNode(List<SnakeInfo> snakes, FoodInfo foodInfo, AbstractHazard hazard, BoardInfo boardInfo)
Constructor, set the information and evaluate/ set score directly- Parameters:
snakes
- List of snakesfoodInfo
- Food informationhazard
- Hazard InfoboardInfo
- board information
-
-
Method Detail
-
setScore
private void setScore()
Sets the node score
-
createNode
public AbstractNode createNode(List<SnakeInfo> snakeInfo, AbstractNode currentNode)
Uses to create fourNode type- Specified by:
createNode
in classAbstractNode
- Parameters:
snakeInfo
- List of snake InfocurrentNode
- Current node- Returns:
- new node from this type
-
-