Files
salmanoff/main.cpp
T

42 lines
734 B
C++
Raw Normal View History

2024-09-04 14:08:50 +10:00
#include <mind.h>
int main(int argc, char **argv)
{
2024-09-05 18:20:33 +10:00
Mind mind;
2024-09-04 14:08:50 +10:00
for (;;)
{
2024-09-08 01:04:41 +10:00
AttentionGrabber currentEmergency = mind.poll();
if (!currentEmergency)
{
// Idle thought's goal is automatically Goal::DRIFT.
auto idleThought = std::make_shared<IdleThought>();
mind.focusOn(idleThought);
}
else
{
thought::Goal goal;
2024-09-08 01:04:41 +10:00
auto urgentThought = std::make_shared<ActiveThought>(currentEmergency);
if (!mind.recognizes(currentEmergency.cause)) {
goal = thought::Goal
2024-09-08 01:04:41 +10:00
::ASSOCIATE_CAUSAL_QUALE_WITH_INTRINSIC_MOTIVATORS;
}
else {
goal = thought::Goal
2024-09-08 01:04:41 +10:00
::RESPOND_TO_CAUSAL_QUALE;
}
urgentThought->setGoal(goal);
mind.focusOn(urgentThought);
}
mind.execute();
2024-09-04 14:08:50 +10:00
}
return 0;
}