-
Notifications
You must be signed in to change notification settings - Fork 612
Description
The current work on turn-based schedules requires sendCommand to send a turn key, in order to enforce strict ordering. At the moment these are randomly generated five character strings, which are provided via an observation, and sent back as the command verb, with the following parameter string containing the actual required command.
On the mod side, the TurnBasedCommandHandler strips the key, compares it to the expected value, and either drops the command (if the key was incorrect) or passes the remaining parameter string on to the normal command handler.
Eg the agent does something like the following:
agent_host.sendCommand("flqvk move 1")
agent_host.sendCommand("pzzpt jump 1")
and the mod's TurnBasedCommandHandler passes "move 1" and "jump 1" on to the relevant movement command handlers (assuming the keys were correct).
While this works nicely to ensure strict turn-based command processing, the turn keys end up in the mission command recordings, since they are sent through the platform as a command string, and the platform processes them like any other command string.
Instead, it would be nicer to add an API method which takes the key as an extra parameter - eg agent_host.sendCommand("move 1", "flqvk")
The platform could then filter out the key.