Class RoyaleDuelNode
- 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.RoyaleDuelNode
-
public class RoyaleDuelNode extends AbstractRoyaleNode
This Royale Duel node class must be use when only 2 snakes left, and in royale mode. Used by Nessegrev-Beta in the Spring 2021 league- Version:
- Spring 2021
- Author:
- carl.lajeunesse
-
-
Field Summary
-
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 RoyaleDuelNode(List<SnakeInfo> snakes, FoodInfo food, 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 royale duel nodeprivate 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
-
-
-
-
Constructor Detail
-
RoyaleDuelNode
public RoyaleDuelNode(List<SnakeInfo> snakes, FoodInfo food, AbstractHazard hazard, BoardInfo boardInfo)
Constructor, set the information and evaluate/ set score directly- Parameters:
snakes
- List of snakesfood
- Food informationhazard
- Hazard InformationboardInfo
- Board Information
-
-
Method Detail
-
setScore
private void setScore()
Sets the node score
-
createNode
public AbstractNode createNode(List<SnakeInfo> snakeInfo, AbstractNode currentNode)
Uses to create royale duel node- Specified by:
createNode
in classAbstractNode
- Parameters:
snakeInfo
- List of snake InfocurrentNode
- Current node- Returns:
- new node from this type
-
-