From 5d90ff4c4428a6382d025c033e401abea21b1ad1 Mon Sep 17 00:00:00 2001 From: Kasper Marinus Date: Mon, 2 Feb 2026 12:47:59 +0100 Subject: [PATCH] feat: do nothing in end phase --- .../agents/bdi/agentspeak_generator.py | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/src/control_backend/agents/bdi/agentspeak_generator.py b/src/control_backend/agents/bdi/agentspeak_generator.py index 0197d86..630f75c 100644 --- a/src/control_backend/agents/bdi/agentspeak_generator.py +++ b/src/control_backend/agents/bdi/agentspeak_generator.py @@ -135,7 +135,6 @@ class AgentSpeakGenerator: """ self._add_reply_with_goal_plan() self._add_say_plan() - self._add_reply_plan() self._add_notify_cycle_plan() def _add_reply_with_goal_plan(self): @@ -199,40 +198,6 @@ class AgentSpeakGenerator: ) ) - def _add_reply_plan(self): - """ - Adds a plan for general reply actions. - - This plan handles general reply actions where the agent needs to respond - to user input without a specific conversational goal. It: - 1. Marks that the agent has responded this turn - 2. Gathers all active norms - 3. Generates a reply based on the user message and norms - - Trigger: +!reply - Context: user_said(Message) - """ - self._asp.plans.append( - AstPlan( - TriggerType.ADDED_GOAL, - AstLiteral("reply"), - [AstLiteral("user_said", [AstVar("Message")])], - [ - AstStatement(StatementType.ADD_BELIEF, AstLiteral("responded_this_turn")), - AstStatement( - StatementType.DO_ACTION, - AstLiteral( - "findall", - [AstVar("Norm"), AstLiteral("norm", [AstVar("Norm")]), AstVar("Norms")], - ), - ), - AstStatement( - StatementType.DO_ACTION, - AstLiteral("reply", [AstVar("Message"), AstVar("Norms")]), - ), - ], - ) - ) def _add_notify_cycle_plan(self): """ @@ -286,21 +251,6 @@ class AgentSpeakGenerator: self._process_phase(curr_phase) self._add_phase_transition(curr_phase, next_phase) - # End phase behavior - # When deleting this, the entire `reply` plan and action can be deleted - self._asp.plans.append( - AstPlan( - type=TriggerType.ADDED_BELIEF, - trigger_literal=AstLiteral("user_said", [AstVar("Message")]), - context=[AstLiteral("phase", [AstString("end")])], - body=[ - AstStatement( - StatementType.DO_ACTION, AstLiteral("notify_user_said", [AstVar("Message")]) - ), - AstStatement(StatementType.ACHIEVE_GOAL, AstLiteral("reply")), - ], - ) - ) def _process_phase(self, phase: Phase) -> None: """