agent_evaluator behaviour (faber_neuroevolution v1.2.4)
View SourceSee also: agent_bridge, agent_environment.
Summary
Types
Unique identifier for the evaluator. Examples: <<"hex_arena_fitness">>, <<"foraging_score">>.
Scalar fitness score. Higher is better. Should be non-negative for compatibility with selection algorithms.
Breakdown of fitness into named components. Useful for analysis and debugging.
Performance metrics from a completed episode. See agent_environment:metrics().
Types
-type evaluator_name() :: binary().
Unique identifier for the evaluator. Examples: <<"hex_arena_fitness">>, <<"foraging_score">>.
-type fitness() :: float().
Scalar fitness score. Higher is better. Should be non-negative for compatibility with selection algorithms.
Breakdown of fitness into named components. Useful for analysis and debugging.
-type metrics() :: map().
Performance metrics from a completed episode. See agent_environment:metrics().
Callbacks
-callback fitness_components(Metrics) -> Components when Metrics :: metrics(), Components :: fitness_components().
-callback name() -> evaluator_name().
Functions
-spec evaluate_with_breakdown(Module, Metrics) -> {ok, Fitness, Components} | {error, Reason} when Module :: module(), Metrics :: metrics(), Fitness :: fitness(), Components :: fitness_components(), Reason :: term().
-spec get_info(Module) -> {ok, Info} | {error, Reason} when Module :: module(), Info :: #{name := evaluator_name(), has_components := boolean()}, Reason :: term().