Record Class VariantAGP.NodeInfo
java.lang.Object
java.lang.Record
gametree.VariantAGP.NodeInfo
- Record Components:
maximising- This istrueif the parent node is maximising andfalseif the parent node is minimising.lowerbound- The lowest lower bound the generated values may take, this already accounts for theVariantAGP.Settings.growth_factorof the tree.relevancebound- The parent's lower bound when it is maximising, or the parents upper bound when it is minimising.upperbound- The greatest upper bound the generated values may take, this already accounts for theVariantAGP.Settings.growth_factorof the tree.depth- The depth of the parent node of the generated children.forceRelevance- This istrueif theVariantAGP.Settings.force_relevance_chancewas triggered for this child node. If this value is provided asfalse, the generation should be performed as usual.Whether this value is
trueorfalsedoes not alter the provided values for thelowerboundandupperbound. However, the expectation for implementation is that, ifforceRelevanceistrue, then the minimum and maximum of the returned values both lie within the range ofrelevantL()torelevantU(). This can be ignored, but will result in theVariantAGP.Settings.force_relevance_chanceparameter losing its function.
- Enclosing class:
VariantAGP
public static record VariantAGP.NodeInfo(boolean maximising, long lowerbound, long relevancebound, long upperbound, long depth, boolean forceRelevance)
extends Record
A record holding the information provided to
Generator functions for determining the bounds of a generated child node.- Version:
- 1.0
- Author:
- Pascal Anema
-
Constructor Summary
ConstructorsConstructorDescriptionNodeInfo(boolean maximising, long lowerbound, long relevancebound, long upperbound, long depth, boolean forceRelevance) Creates an instance of aNodeInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforceRelevancerecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thelowerboundrecord component.booleanReturns the value of themaximisingrecord component.longReturns the value of therelevanceboundrecord component.longThe relevant lower bound is the lower bound of the parent node.longThe relevant upper bound is the upper bound of the parent node.final StringtoString()Returns a string representation of this record class.longReturns the value of theupperboundrecord component.
-
Constructor Details
-
NodeInfo
public NodeInfo(boolean maximising, long lowerbound, long relevancebound, long upperbound, long depth, boolean forceRelevance) Creates an instance of aNodeInforecord class.- Parameters:
maximising- the value for themaximisingrecord componentlowerbound- the value for thelowerboundrecord componentrelevancebound- the value for therelevanceboundrecord componentupperbound- the value for theupperboundrecord componentdepth- the value for thedepthrecord componentforceRelevance- the value for theforceRelevancerecord component
-
-
Method Details
-
relevantL
public long relevantL()The relevant lower bound is the lower bound of the parent node. At least one of the child nodes generated at every parent should have a lower bound equal to or above the relevant lower bound.- Returns:
- The relevant lower bound for this node
-
relevantU
public long relevantU()The relevant upper bound is the upper bound of the parent node. At least one of the child nodes generated at every parent should have an upper bound equal to or below the relevant upper bound.- Returns:
- The relevant upper bound for this node
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
maximising
public boolean maximising()Returns the value of themaximisingrecord component.- Returns:
- the value of the
maximisingrecord component
-
lowerbound
public long lowerbound()Returns the value of thelowerboundrecord component.- Returns:
- the value of the
lowerboundrecord component
-
relevancebound
public long relevancebound()Returns the value of therelevanceboundrecord component.- Returns:
- the value of the
relevanceboundrecord component
-
upperbound
public long upperbound()Returns the value of theupperboundrecord component.- Returns:
- the value of the
upperboundrecord component
-
depth
-
forceRelevance
public boolean forceRelevance()Returns the value of theforceRelevancerecord component.- Returns:
- the value of the
forceRelevancerecord component
-