You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it’s unclear how to easily implement pausing and resuming the performance of AI agents without re-evaluation.
Sometimes, we need to pause the AI. For instance, a simple pause menu might require globally pausing the entire system. Alternatively, we might want to pause specific agents, which would be a local agent pause rather than a system-wide one. Upon resuming the game or reactivating an AI agent, we would like them to continue pursuing their previously paused goals and the last action without re-evaluating, as re-evaluation could lead to loss of state or data.
Setting Time.timeScale = 0. However, this approach is suitable mainly for pause menus and even then, not always
Disabling the GoapBehaviour along with its IGoapController does not actually pause the ongoing AI logic that is currently being executed
Caching agent goals via agent.CurrentPlan.Goal followed by agent.ClearGoal() stops the AI, and later, calling agent.RequestGoal(cachedGoal) resumes the logic without re-evaluation. However, if the agent is toggled too quickly, attempting to read its goal risks throwing a null exception when accessing agent.CurrentPlan
Calling agent.StopAction() causes a loss of state and triggers re-evaluation
It would be great to have a clear API that allows pausing an agent without losing its state or data, ensuring that when resumed, it avoids re-evaluation, and the previously paused action continues seamlessly (provided that the conditions are still valid).
The text was updated successfully, but these errors were encountered:
Currently, it’s unclear how to easily implement pausing and resuming the performance of AI agents without re-evaluation.
Sometimes, we need to pause the AI. For instance, a simple pause menu might require globally pausing the entire system. Alternatively, we might want to pause specific agents, which would be a local agent pause rather than a system-wide one. Upon resuming the game or reactivating an AI agent, we would like them to continue pursuing their previously paused goals and the last action without re-evaluating, as re-evaluation could lead to loss of state or data.
Time.timeScale = 0
. However, this approach is suitable mainly for pause menus and even then, not alwaysGoapBehaviour
along with itsIGoapController
does not actually pause the ongoing AI logic that is currently being executedagent.CurrentPlan.Goal
followed byagent.ClearGoal()
stops the AI, and later, callingagent.RequestGoal(cachedGoal)
resumes the logic without re-evaluation. However, if the agent is toggled too quickly, attempting to read its goal risks throwing a null exception when accessingagent.CurrentPlan
agent.StopAction()
causes a loss of state and triggers re-evaluationIt would be great to have a clear API that allows pausing an agent without losing its state or data, ensuring that when resumed, it avoids re-evaluation, and the previously paused action continues seamlessly (provided that the conditions are still valid).
The text was updated successfully, but these errors were encountered: