Record Class KingfisherSettings
- Record Components:
debug- whether additional debug information should be logged while the AI is evaluatingcopyRandomState- whether copied battle states should preserve the current random state for deterministic simulationsearch- the settings controlling search depth and terminal battle scoringactionGeneration- the settings controlling how candidate actions are generated and filteredevaluationWeights- weighting values applied to each registered evaluation module by id
This record groups together the settings that control how Kingfisher searches possible battle states, generates candidate actions, handles randomness during simulation, and combines the individual evaluation modules into a final score.
The settings are data-driven, allowing the behaviour of the AI to be configured without changing the implementation. The search settings define how far ahead the AI looks, the action generation settings define which choices are considered, and the evaluation weights define how strongly each registered evaluator contributes to the final score.
Used byKingfisherAI-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<KingfisherSettings> Default evaluator weights used by the bundled fallback settings and tests. -
Constructor Summary
ConstructorsConstructorDescriptionKingfisherSettings(boolean debug, boolean copyRandomState, SearchSettings search, ActionGeneration actionGeneration, Map<String, Double> evaluationWeights) Creates an instance of aKingfisherSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionGenerationrecord component.booleanReturns the value of thecopyRandomStaterecord component.booleandebug()Returns the value of thedebugrecord component.static KingfisherSettingsCreates the fallback Kingfisher settings used by tests and development defaults.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevaluationWeightsrecord component.final inthashCode()Returns a hash code value for this object.search()Returns the value of thesearchrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
DEFAULT_EVALUATION_WEIGHTS
Default evaluator weights used by the bundled fallback settings and tests.These values are not intended to be a fully tuned or authoritative Kingfisher configuration. The real implementation is data-driven, so production behaviour should be defined through the configured datapack settings. These defaults simply provide a known working baseline for tests and development.
-
-
Constructor Details
-
KingfisherSettings
public KingfisherSettings(boolean debug, boolean copyRandomState, SearchSettings search, ActionGeneration actionGeneration, Map<String, Double> evaluationWeights) Creates an instance of aKingfisherSettingsrecord class.- Parameters:
debug- the value for thedebugrecord componentcopyRandomState- the value for thecopyRandomStaterecord componentsearch- the value for thesearchrecord componentactionGeneration- the value for theactionGenerationrecord componentevaluationWeights- the value for theevaluationWeightsrecord component
-
-
Method Details
-
defaultSettings
Creates the fallback Kingfisher settings used by tests and development defaults.This is not intended to represent the final or preferred AI balance. It exists as a simple, known working configuration for cases where no data-driven settings have been provided.
- Returns:
- a baseline Kingfisher configuration
-
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 '=='. -
debug
public boolean debug()Returns the value of thedebugrecord component.- Returns:
- the value of the
debugrecord component
-
copyRandomState
public boolean copyRandomState()Returns the value of thecopyRandomStaterecord component.- Returns:
- the value of the
copyRandomStaterecord component
-
search
Returns the value of thesearchrecord component.- Returns:
- the value of the
searchrecord component
-
actionGeneration
Returns the value of theactionGenerationrecord component.- Returns:
- the value of the
actionGenerationrecord component
-
evaluationWeights
Returns the value of theevaluationWeightsrecord component.- Returns:
- the value of the
evaluationWeightsrecord component
-