The Big One #43
@@ -171,7 +171,7 @@ class AgentSpeakGenerator:
|
|||||||
self._astify(to_phase) if to_phase else AstLiteral("phase", [AstString("end")])
|
self._astify(to_phase) if to_phase else AstLiteral("phase", [AstString("end")])
|
||||||
)
|
)
|
||||||
|
|
||||||
context = [from_phase_ast, ~AstLiteral("responded_this_turn")]
|
context = [from_phase_ast]
|
||||||
if from_phase and from_phase.goals:
|
if from_phase and from_phase.goals:
|
||||||
context.append(self._astify(from_phase.goals[-1], achieved=True))
|
context.append(self._astify(from_phase.goals[-1], achieved=True))
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,14 @@ class BDICoreAgent(BaseAgent):
|
|||||||
agentspeak.runtime.Intention(),
|
agentspeak.runtime.Intention(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Check for transitions
|
||||||
|
self.bdi_agent.call(
|
||||||
|
agentspeak.Trigger.addition,
|
||||||
|
agentspeak.GoalType.achievement,
|
||||||
|
agentspeak.Literal("transition_phase"),
|
||||||
|
agentspeak.runtime.Intention(),
|
||||||
|
)
|
||||||
|
|
||||||
self._wake_bdi_loop.set()
|
self._wake_bdi_loop.set()
|
||||||
|
|
||||||
self.logger.debug(f"Added belief {self.format_belief_string(name, args)}")
|
self.logger.debug(f"Added belief {self.format_belief_string(name, args)}")
|
||||||
|
|||||||
Reference in New Issue
Block a user