Record Class ActionGeneration
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.controller.ai.evaluation.settings.ActionGeneration
- Record Components:
memoryMode- the opponent/team knowledge model used when generating possible actionsconsiderSwitches- whether legal switch choices should be included as candidate actionscheckForcedMoves- whether forced battle states, such as locked or mandatory moves, should be handled before normal action generationcheckImmediateTacticalOptions- whether immediate tactical options, such as guaranteed knockouts or urgent defensive responses, should be checked before falling back to full search evaluation
public record ActionGeneration(MemoryMode memoryMode, boolean considerSwitches, boolean checkForcedMoves, boolean checkImmediateTacticalOptions)
extends Record
Configuration for how Kingfisher generates and filters candidate battle actions during search.
This controls which actions are available to the AI before a board state is evaluated. It determines how much opponent information is assumed to be known, whether switching is considered, and whether special action-selection shortcuts such as forced moves or immediate tactical options are checked before normal move evaluation.
The action generation step is intentionally separate from board evaluation. This record does not score a battle state directly; it only controls which choices the AI is allowed or encouraged to consider while exploring possible future turns.
Used byKingfisherAI-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ActionGeneration> static final ActionGeneration -
Constructor Summary
ConstructorsConstructorDescriptionActionGeneration(MemoryMode memoryMode, boolean considerSwitches, boolean checkForcedMoves, boolean checkImmediateTacticalOptions) Creates an instance of aActionGenerationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecheckForcedMovesrecord component.booleanReturns the value of thecheckImmediateTacticalOptionsrecord component.booleanReturns the value of theconsiderSwitchesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thememoryModerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
DEFAULT
-
-
Constructor Details
-
ActionGeneration
public ActionGeneration(MemoryMode memoryMode, boolean considerSwitches, boolean checkForcedMoves, boolean checkImmediateTacticalOptions) Creates an instance of aActionGenerationrecord class.- Parameters:
memoryMode- the value for thememoryModerecord componentconsiderSwitches- the value for theconsiderSwitchesrecord componentcheckForcedMoves- the value for thecheckForcedMovesrecord componentcheckImmediateTacticalOptions- the value for thecheckImmediateTacticalOptionsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
memoryMode
Returns the value of thememoryModerecord component.- Returns:
- the value of the
memoryModerecord component
-
considerSwitches
public boolean considerSwitches()Returns the value of theconsiderSwitchesrecord component.- Returns:
- the value of the
considerSwitchesrecord component
-
checkForcedMoves
public boolean checkForcedMoves()Returns the value of thecheckForcedMovesrecord component.- Returns:
- the value of the
checkForcedMovesrecord component
-
checkImmediateTacticalOptions
public boolean checkImmediateTacticalOptions()Returns the value of thecheckImmediateTacticalOptionsrecord component.- Returns:
- the value of the
checkImmediateTacticalOptionsrecord component
-