7 #include "CuriosityModule.h"
8 #include "GeneticTrainer.h"
103 virtual void MapAgentToChromosome(
IAgent* agent,
int chromosomeIndex) = 0;
149 SMARTENGINE_EXPORT
void GeneticAgentTrainer_MapAgentToChromosome(ObjPtr
object, ObjPtr agent,
int chromosomeIndex);
150 SMARTENGINE_EXPORT
float GeneticAgentTrainer_GetSumRawRewards(ObjPtr
object,
int chromosomeIndex,
int discounted);
151 SMARTENGINE_EXPORT
float GeneticAgentTrainer_GetCuriosityRewards(ObjPtr
object,
int chromosomeIndex,
int discounted);
152 SMARTENGINE_EXPORT
void GeneticAgentTrainer_ProcessAgentData(ObjPtr
object,
bool onlyCompletedEpisodes);
153 SMARTENGINE_EXPORT ObjPtr GeneticAgentTrainer_CreateAgent(ObjPtr
object);
float gamma
Gamma to apply to rewards over time.
Definition: GeneticAgentTrainer.h:83
Data used to construct an IResource instance
Definition: Resource.h:16
RL trainers implement this to create agents.
Definition: Agent.h:129
virtual float GetSumRawRewards(int chromosomeIndex, bool discounted=true) const =0
Returns the sum of the raw agent rewards for a given chromosome.
int curiosityTrainEpochs
The number of epochs to train the curiosity module on the incoming agent data.
Definition: GeneticAgentTrainer.h:78
IAgentDataStore * dataStore
The data store that agents will feed into.
Definition: GeneticAgentTrainer.h:50
IContext * context
The context this trainer belongs to.
Definition: GeneticAgentTrainer.h:40
@ Sum
Sum the scores of all agents associated with the chromosome
GeneticAgentScoringMethod scoringMethod
Defines how the trainer deals with chromosome scores from multiple agents.
Definition: GeneticAgentTrainer.h:88
const char ** policyNodeNames
The names of the output nodes of the actor (the network used to manipulate the environment)....
Definition: GeneticAgentTrainer.h:62
Data used to construct an IGeneticAgentTrainer instance
Definition: GeneticAgentTrainer.h:36
const char * agentName
The base name for created agents.
Definition: GeneticAgentTrainer.h:55
SMARTENGINE_EXPORT ObjectPtr< IGeneticAgentTrainer > CreateGeneticAgentTrainer(const GeneticAgentTrainerCInfo &cinfo)
Creates an instance of IGeneticAgentTrainer
Smart pointer to an IObject. Automatic ref counting.
Definition: ObjectPtr.h:16
Trains a NeuronLayer / NeuralNetwork using a genetic algorithm. With each step, networks are sorted b...
Definition: GeneticTrainer.h:226
Definition: A2CTrainer.h:10
virtual void ProcessAgentData(bool onlyCompletedEpisodes=true)=0
Crunches and aggregates whatever data the agents have collected so far. This can be called at any tim...
virtual float GetCuriosityRewards(int chromosomeIndex, bool discounted=true) const =0
Returns the sum of the curiosity rewards for a given chromosome.
A curiosity module is a way of rewarding an agent for behavior not yet seen. Rewards are given based ...
Definition: CuriosityModule.h:108
int policyNodeNameCount
The number of elements in the policy node name array
Definition: GeneticAgentTrainer.h:67
A graph is a collection of buffers and nodes that together form a neural network. The graph is create...
Definition: Graph.h:61
GeneticAgentScoringMethod
Defines how the trainer deals with chromosome scores from multiple agents.
Definition: GeneticAgentTrainer.h:20
IGraph * graph
The graph we are going to train.
Definition: GeneticAgentTrainer.h:45
The agent data store keeps experience data for the purpose of training. Some RL trainers don't store ...
Definition: Agent.h:57
Every node in the AI graph must belong to the same context.
Definition: Context.h:40
A genetic trainer that uses agents to automatically set the loss of each chromosome....
Definition: GeneticAgentTrainer.h:98
Agents are used to track the performance of one instance of a network.
Definition: Agent.h:84
ICuriosityModule * curiosityModule
Optional curiosity module for additional curiosity rewards.
Definition: GeneticAgentTrainer.h:72