Files
pepperplus-cb/src/control_backend/agents/bdi/agentspeak.asl
2026-01-07 17:42:54 +01:00

46 lines
1.1 KiB
Plaintext

phase("9922935f-ec70-4792-9a61-37a129e1ec14").
keyword_said(Keyword) :- (user_said(Message) & .substring(Keyword, Message, Pos)) & (Pos >= 0).
+!reply_with_goal(Goal)
: user_said(Message)
<- +responded_this_turn;
.findall(Norm, norm(Norm), Norms);
.reply_with_goal(Message, Norms, Goal).
+!say(Text)
<- +responded_this_turn;
.say(Text).
+!reply
: user_said(Message)
<- +responded_this_turn;
.findall(Norm, norm(Norm), Norms);
.reply(Message, Norms).
+user_said(Message)
: phase("9922935f-ec70-4792-9a61-37a129e1ec14")
<- .notify_user_said(Message);
-responded_this_turn;
!check_triggers;
!transition_phase.
+!transition_phase
: phase("9922935f-ec70-4792-9a61-37a129e1ec14") &
not responded_this_turn
<- -phase("9922935f-ec70-4792-9a61-37a129e1ec14");
+phase("end");
?user_said(Message);
-+user_said(Message);
.notify_transition_phase("9922935f-ec70-4792-9a61-37a129e1ec14", "end").
+user_said(Message)
: phase("end")
<- !reply.
+!check_triggers
<- true.
+!transition_phase
<- true.