-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to "miss" very short missions #118
Comments
Note that this is only a problem once #23 is fixed, since without that fix very short missions break the mod long before they have a chance to break the agent. |
Yes. Maybe WorldState could replace Then in user code this loop would be:
and the main loop would be:
|
Am making it a P4 since it will only be a problem for some mission designs, and there's an easy workaround in those cases (reducing the time.sleep value). |
Make startMission block until mission started? New API startMissionAndWait? Samples should use peekWorldState too. |
Most of our samples do something similar to this:
It's possible to create missions that can finish within 0.1 seconds - for example, in a setting where an agent must get to a goal square, but the start and end squares are randomised, it is possible for the agent's initial state to satisfy the end conditions.
In such cases, the above code can end up waiting forever, as the is_mission_running flag can be set and then unset again within the time.sleep() call.
One possible fix is to reduce the sleep time; alternatively, agent_host could have an is_mission_over flag too, instead of relying on is_mission_running.
The text was updated successfully, but these errors were encountered: