(C++)  1.1.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Reasoner.hh
1 #ifndef GRAIL_REASONER_H
2 #define GRAIL_REASONER_H
3 
4 #include "Behavior.hh"
5 #include "DebugUtilities/ISnapshotGenerator.h"
6 
7 #include <iostream>
8 #include <fstream>
9 #include <vector>
10 #include <memory>
11 
12 namespace grail
13 {
14  class AIEntity;
15 
19  class Reasoner
20  {
21  public:
22  Reasoner() = default;
23  Reasoner(const Reasoner&) = default;
24  Reasoner(Reasoner&&) = default;
25 
26  virtual ~Reasoner() = default;
27 
28  Reasoner& operator = (const Reasoner&) = default;
29  Reasoner& operator = (Reasoner&&) = default;
30 
35  virtual void SelectBehavior(AIEntity& entity) = 0;
36  virtual std::unique_ptr<ISnapshotGenerator> CreateSnapshotGenerator(size_t /*entityId*/);
37  };
38 }
39 #endif //GRAIL_REASONER_H
The AIEntity class - Defines a basic object which can execute behaviors.
Definition: AIEntity.hh:39
The Reasoner class - Entity's "brain", assigns them behaviors chosen by user-defined algorithms.
Definition: Reasoner.hh:20
virtual void SelectBehavior(AIEntity &entity)=0
selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity.