Record Class RolloutResult<S,A>
java.lang.Object
java.lang.Record
dev.twilite.game.simulation.rollout.RolloutResult<S,A>
- Type Parameters:
S- simulated state typeA- action type- Record Components:
node- selected search node
Best branch selected by a rollout search.
-
Constructor Summary
ConstructorsConstructorDescriptionRolloutResult(RolloutNode<S, A> node) Creates an instance of aRolloutResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the full selected action branch.final booleanIndicates whether some other object is "equal to" this one.Returns the first action to execute.final inthashCode()Returns a hash code value for this object.node()Returns the value of thenoderecord component.doublescore()Returns the selected branch's average score.state()Returns the final state for the selected branch.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RolloutResult
Creates an instance of aRolloutResultrecord class.- Parameters:
node- the value for thenoderecord component
-
-
Method Details
-
state
Returns the final state for the selected branch. -
firstAction
Returns the first action to execute. -
actions
Returns the full selected action branch. -
score
public double score()Returns the selected branch's average score. -
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. -
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. -
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 withObjects::equals(Object,Object). -
node
Returns the value of thenoderecord component.- Returns:
- the value of the
noderecord component
-