Files
salmanoff/smocore/include/director/director.h
T
hayodea 91ccd16b33 Add Mrntt component; init globalMind in mrntt.initializeReq
This makes the initialization sequence much cleaner and conceptually
well encapsulated.

We also now dynamically allocate the Mind objects. They're allocated
dynamically by Mrntt inside of initializeReq. This means that we no
longer have to worry about jolting and cleaning up the running threads
of global mind object even when we never explicitly called
Mind.initializeReq.

Along with other conceptual improvements to our abstractions, this
patch also gets us to a real "end of program initialization" point
for the first time.
2025-09-14 22:17:19 -04:00

54 lines
1.2 KiB
C++

#ifndef DIRECTOR_H
#define DIRECTOR_H
#include <config.h>
#include <component.h>
#include <goal.h>
#include <lruLifo.h>
namespace smo {
class Mind;
class ComponentThread;
namespace director {
class Director
: public MindComponent
{
public:
Director(Mind &parent, const std::shared_ptr<ComponentThread> &thread)
: MindComponent(parent, thread)
{}
~Director() = default;
/** EXPLANATION:
* We allow SMO to prioritize negtrins over injected goals, so that it can
* prioritize pain mitigation. We may decide to change this in the future.
*
* NB: Prioritizing negtrins is not the same as priortizing
* self-preservation...at least we don't think so at the moment of writing.
* It is definitely not desirable for SMO to prioritize self-preservation
* over our injected goals.
*/
LruLifo negtrins;
/** EXPLANATION:
* These are goals injected by Mrntt. This is how Mrntt is able to inject
* goals into the director.
*/
LruLifo injectedGoals;
/** EXPLANATION:
* These are goals chosen by the running mind. Director will always
* prioritize injected goals over chosen goals.
*/
LruLifo chosenGoals;
LruLifo postrins;
LruLifo nontrins;
};
} // namespace director
} // namespace smo
#endif // DIRECTOR_H