SmartEngine
1.6.0
|
Agents are used to track the performance of one instance of a network. More...
#include <Agent.h>
Public Member Functions | |
virtual void | StartNewExperience ()=0 |
Starts a new experience. It is expected that RecordObservation(), RecordAction(), and GiveReward() will all be called at least once before the next experience is started. More... | |
virtual void | RecordObservation (const char *inputName, const float *buffer, int64 bufferCount)=0 |
Records the input data to the network we are watching. More... | |
virtual void | RecordAction (const char *actionName, const float *buffer, int64 bufferCount)=0 |
Records the output of the network we applied to the environment (the game or character) More... | |
virtual void | GiveReward (float reward)=0 |
The trainers will try to maximize rewards. The higher the value, the better the rewards. Rewards can also be negative. More... | |
virtual void | EndEpisode ()=0 |
Called at the logical conclusion of a training session. Usually some event like the player died or the game ended. More... | |
Public Member Functions inherited from SmartEngine::IObject | |
virtual ObjectId | GetId () const =0 |
Returns the ID of this object. More... | |
virtual void | AddRef () const =0 |
Increments the internal reference count on this object. It is not common to use this method directly. More... | |
virtual void | Release () const =0 |
Decrements the internal reference count on this object. It is not common to use this method directly. More... | |
virtual int | GetRefCount () const =0 |
Returns the number of references to this object. More... | |
virtual void * | QueryInterface (ObjectClassId id)=0 |
Queries the object for an interface and returns a pointer to that interface if found. More... | |
void | operator= (IObject const &x)=delete |
Public Member Functions inherited from SmartEngine::ISerializable | |
virtual SerializationResult | Serialize (IMemoryBuffer *buffer)=0 |
Write the contents of this object to a buffer. More... | |
virtual SerializationResult | Deserialize (IMemoryBuffer *buffer)=0 |
Fill this object with contents from a buffer. More... | |
Additional Inherited Members | |
Public Attributes inherited from SmartEngine::IObject | |
private | |
__pad0__: IObject() {} IObject(IObject const&) = delete | |
Agents are used to track the performance of one instance of a network.
For each step, you start a new experience. Then record the observation (the network's input data), the action (output of the network), and the rewards it received during that time.
When you reach a logical conclusion of your training (the character dies or the game ends, for example), end the episode.
|
pure virtual |
Called at the logical conclusion of a training session. Usually some event like the player died or the game ended.
|
pure virtual |
The trainers will try to maximize rewards. The higher the value, the better the rewards. Rewards can also be negative.
reward |
|
pure virtual |
Records the output of the network we applied to the environment (the game or character)
actionName | The name of the output graph node in the graph definition |
actionData | In the case of discrete actions, the index of the chosen neuron. For continuous actions, the raw output. |
|
pure virtual |
Records the input data to the network we are watching.
inputName | The name of the BufferInput in the graph definition |
obsData | The buffer's input |
|
pure virtual |
Starts a new experience. It is expected that RecordObservation(), RecordAction(), and GiveReward() will all be called at least once before the next experience is started.