Record Class VariantAGP.NodeInfo

java.lang.Object
java.lang.Record
gametree.VariantAGP.NodeInfo
Record Components:
maximising - This is true if the parent node is maximising and false if the parent node is minimising.
lowerbound - The lowest lower bound the generated values may take, this already accounts for the VariantAGP.Settings.growth_factor of 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 the VariantAGP.Settings.growth_factor of the tree.
depth - The depth of the parent node of the generated children.
forceRelevance - This is true if the VariantAGP.Settings.force_relevance_chance was triggered for this child node. If this value is provided as false, the generation should be performed as usual.

Whether this value is true or false does not alter the provided values for the lowerbound and upperbound. However, the expectation for implementation is that, if forceRelevance is true, then the minimum and maximum of the returned values both lie within the range of relevantL() to relevantU(). This can be ignored, but will result in the VariantAGP.Settings.force_relevance_chance parameter 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

    Constructors
    Constructor
    Description
    NodeInfo(boolean maximising, long lowerbound, long relevancebound, long upperbound, long depth, boolean forceRelevance)
    Creates an instance of a NodeInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the depth record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the forceRelevance record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the lowerbound record component.
    boolean
    Returns the value of the maximising record component.
    long
    Returns the value of the relevancebound record component.
    long
    The relevant lower bound is the lower bound of the parent node.
    long
    The relevant upper bound is the upper bound of the parent node.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the upperbound record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NodeInfo

      public NodeInfo(boolean maximising, long lowerbound, long relevancebound, long upperbound, long depth, boolean forceRelevance)
      Creates an instance of a NodeInfo record class.
      Parameters:
      maximising - the value for the maximising record component
      lowerbound - the value for the lowerbound record component
      relevancebound - the value for the relevancebound record component
      upperbound - the value for the upperbound record component
      depth - the value for the depth record component
      forceRelevance - the value for the forceRelevance record 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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maximising

      public boolean maximising()
      Returns the value of the maximising record component.
      Returns:
      the value of the maximising record component
    • lowerbound

      public long lowerbound()
      Returns the value of the lowerbound record component.
      Returns:
      the value of the lowerbound record component
    • relevancebound

      public long relevancebound()
      Returns the value of the relevancebound record component.
      Returns:
      the value of the relevancebound record component
    • upperbound

      public long upperbound()
      Returns the value of the upperbound record component.
      Returns:
      the value of the upperbound record component
    • depth

      public long depth()
      Returns the value of the depth record component.
      Returns:
      the value of the depth record component
    • forceRelevance

      public boolean forceRelevance()
      Returns the value of the forceRelevance record component.
      Returns:
      the value of the forceRelevance record component