|
| SimulatedGameReasoner (std::unique_ptr< simulation::ISimulatedGameStateTranslator > worldStateTranslator, std::unique_ptr< simulation::ISimulatedActionTranslator > actionTranslator, std::size_t iterationsPerFrame, std::size_t maxIterations=1000, std::size_t maxRecalculationIterations=1000) |
| Constructs a new SimulatedGameReasoner More...
|
|
virtual void | SelectBehavior (AIEntity &entity) override |
| selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity. More...
|
|
void | SetFallbackBehavior (std::unique_ptr< Behavior > _fallbackBehavior) |
| Set a fallback behavior if no valid behaviors are produced from actions returned by SimulatedGame. Please note that ISimulatedActionTranslator translates actions onto behaviors.
|
|
const simulation::SimulatedGame & | getGame () const |
| Gets the SimulatedGame object that is currently created by the ISimulatedGameStateTranslator.
|
|
void | RequestRecalculation (AIEntity &entity) |
| As documented, the ISimulatedActionTranslator translates the actions computed by SimulatedGame to behaviors. It constructs a plan (of such behaviors). Call this method at anytime if you want to stop applying behaviors (it will terminate the current one and clear all future ones). This should be called when the state desynchronizes, so the future plan should be invalidated. The method will make the reasoner perform additional simulations if computational budget allows for it. More...
|
|
void | SetSnapshotProduction (bool shouldProduce) |
| Calling this function makes the reasoner collect debug data. The GrailDebugger will call it automatically.
|
|
void | SetDebugSnapshotFirstIteration (size_t iterationNumber) |
| You may limit the number of debug data collected to only data produced by simulations with numbers between [First, Last]. This method sets: First = iterationNumber.
|
|
void | SetDebugSnapshotLastIteration (size_t iterationNumber) |
| You may limit the number of debug data collected to only data produced by simulations with numbers between [First, Last]. This method sets: Last = iterationNumber.
|
|
size_t | GetDebugSnapshotFirstIteration () const |
| If the debug data is collected, this method will return the first iteration number from which the data is collected.
|
|
size_t | GetDebugSnapshotLastIteration () const |
| If the debug data is collected, this method will return the last iteration number up to which the data is collected.
|
|
bool | IsComputing () const |
| Returns true is the reasoner has not finished computations (i.e. there are still simulations to perform).
|
|
std::unique_ptr< ISnapshotGenerator > | CreateSnapshotGenerator (size_t) override |
|
SimulatedGameReasonerSnapshot | ProduceDebugSnapshot () |
| This method returns debug snapshot of data collected so far by SimulatedGameObserverForGUI. The GrailDebugger will call it.
|
|
| Reasoner (const Reasoner &)=default |
|
| Reasoner (Reasoner &&)=default |
|
Reasoner & | operator= (const Reasoner &)=default |
|
Reasoner & | operator= (Reasoner &&)=default |
|