Tracks the population as a set of trials over time, providing information to individual members as appropriate. More...
#include <PopulationManager.h>
Public Member Functions | |
void | RegisterLifeCycle () |
void | ResetExperiment () |
void | Save (USaveEvolvingBehavior *sg) |
void | Load (USaveEvolvingBehavior *sg) |
void | DeleteSave () |
void | SaveTrees (int32) |
void | GenerateInitialPopulation () |
void | LogTrialResults (int32) |
void | SaveFitnessResultLog (int32 trialNum) |
void | SetEvoManager (UBTEvolutionManagerComponent *em) |
void | SetTrialSize (int32 ts) |
UFitnessTracker * | GetTracker () |
void | SetTracker (UFitnessTracker *t) |
void | Breed (int32 trialNumber) |
int32 | GetCurrentTrialNumber () |
UTrial * | GetTrial (int32 trial) |
bool | AsyncLoadTrial (int32 trial) |
bool | LoadTrial (int32 trial) |
UTrial * | GetCurrTrial () |
bool | IsTrialReady () |
Returns true if the current trial is set up and its population is created. | |
bool | IsTrialNumReady (int32 trialNum) |
Returns true if the trial is set up and its population is created. | |
FString | GetSaveSlotName () |
void | OnLoadedTrial (const FString &slot, const int32 userIdx, USaveGame *sg) |
FName | GetTrialObjectName (int32 trialNum) |
FName | GetTrialObjectName (FString saveSlotName, int32 trialNum) |
void | AsyncSave () |
void | Save () |
void | OnSaveFinished (const FString &slot, const int32 userIdx, bool success) |
bool | Register (FPopulationReg &outReg) |
Retrieves the next unused registration (behavior tree and its ID) from the population. Returns true and puts the results in the outReg variable, or returns false if no registration was available. | |
void | ReleaseRegistration (int32 id) |
bool | IsRegistered (int32 id) |
FNewTrialPopulationReady & | OnTrialPopulationReady () |
int32 | GetPopulationRemaining () |
int32 | GetNumSpawnedThisTrial () |
void | DataLoaded () |
virtual void | DataLoaded_Implementation () override |
void | DataSaved () |
virtual void | DataSaved_Implementation () override |
Public Member Functions inherited from UService | |
virtual void | Init (UServiceInjector *injector) |
Public Member Functions inherited from ISaveable | |
void | DataLoaded () |
void | DataSaved () |
Public Attributes | |
int32 | TrialSize |
FString | TreeSavePath = "/Game/EvolvingBehavior" |
Additional Inherited Members | |
Protected Attributes inherited from UService | |
UServiceInjector * | serviceInjector |
Tracks the population as a set of trials over time, providing information to individual members as appropriate.
Each entity that needs a chromosome must register with the PopulationManager to get an ID.
If the population manager is not ready, they can wait for the NewTrialPopulationReady event and then re-register.