Grail (C++)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Reasoner.hh
1
// Copyright QED Software 2023.
2
3
#ifndef GRAIL_REASONER_H
4
#define GRAIL_REASONER_H
5
6
#include "Behavior.hh"
7
#include "DebugUtilities/ISnapshotGenerator.h"
8
9
#include <fstream>
10
#include <iostream>
11
#include <memory>
12
#include <vector>
13
14
namespace
grail
15
{
16
class
AIEntity;
17
21
class
Reasoner
22
{
23
friend
class
AIEntity
;
24
public
:
25
Reasoner
() =
default
;
26
Reasoner
(
const
Reasoner
&) =
default
;
27
Reasoner
(
Reasoner
&&) =
default
;
28
29
virtual
~
Reasoner
() =
default
;
30
31
Reasoner
& operator =(
const
Reasoner
&) =
default
;
32
Reasoner
& operator =(
Reasoner
&&) =
default
;
33
38
virtual
void
StageBehavior
(
AIEntity
& entity) = 0;
39
virtual
std::unique_ptr<ISnapshotGenerator> CreateSnapshotGenerator(
size_t
/*entityId*/
);
40
41
protected
:
45
virtual
void
ClearCache
();
46
47
private
:
48
49
};
50
}
51
#endif //GRAIL_REASONER_H
grail::AIEntity
The AIEntity class - Defines a basic object which can execute behaviors.
Definition:
AIEntity.hh:50
grail::Reasoner
The Reasoner class - Entity's "brain", assigns them behaviors chosen by user-defined algorithms.
Definition:
Reasoner.hh:21
grail::Reasoner::ClearCache
virtual void ClearCache()
ClearCache - called when assigning this reasoner to an entity. Clears internally stored data,...
Definition:
Reasoner.cpp:10
grail::Reasoner::StageBehavior
virtual void StageBehavior(AIEntity &entity)=0
selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity.
GrailCore
Reasoner.hh
Generated by
1.8.17