EvolvingBehavior  0.2.0
 
Loading...
Searching...
No Matches
UPopulationManager Class Reference

Tracks the population as a set of trials over time, providing information to individual members as appropriate. More...

#include <PopulationManager.h>

Inheritance diagram for UPopulationManager:
UService ISaveable

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)
 
UFitnessTrackerGetTracker ()
 
void SetTracker (UFitnessTracker *t)
 
void Breed (int32 trialNumber)
 
int32 GetCurrentTrialNumber ()
 
UTrialGetTrial (int32 trial)
 
bool AsyncLoadTrial (int32 trial)
 
bool LoadTrial (int32 trial)
 
UTrialGetCurrTrial ()
 
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
UServiceInjectorserviceInjector
 

Detailed Description

Tracks the population as a set of trials over time, providing information to individual members as appropriate.

Author
agrundwerg
npc
Date
12/12/17

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.


The documentation for this class was generated from the following files:
  • Source/EvolvingBehavior/Public/PopulationManager.h
  • Source/EvolvingBehavior/Private/PopulationManager.cpp