Using Cyclic Steps for Trainee Freedom
If you need a refresher on the basics of See Also; Cyclic Steps.
Since Cyclic Steps can run in the background constantly checking conditions and they don't stop the agent from progressing, they can be used when the Instructor wants to give the Trainee choices without making them do steps in a predetermined order. In this example, we will give the Trainee three tasks they must perform before landing the plane, but we will allow them to do these tasks in any order.
1. Create a new session with a controlled Cessna. Right click in the Knowledge Center white space > New > Session. Once in Scenario Editor, right click on the map > New > Cessna.
2. Create a new agent for the Cessna. Right click in the white space under the Agents Tab > New > Virtual Instructor.
3. In the first step, we'll right click Instructions > Instructional Aids > VI Guidance and tell the trainee that we want them to A) set the flaps, B) throttle down and C) drop below 5,000 feet.
4. Next, set a time counter. Right click on the VI Guidance > Advanced > Call Action and select ACTION_RESET_TIME_COUNTER_1 (check Show hidden tokens box) which will track time for us throughout the rest of the agent.
5. Now we want to create a new Local Parameter called “Steps” to track the steps as they're completed. Click View on the Scenario Editor toolbar > Local Parameters > right click on Local Parameters > New.
6. Next we want to make sure this Local Parameter initializes with a value of 0, so in the first step right click on Instructions in Step 1 > Set Local Parameter, select Steps and set the value to 0.
7. Now we'll set our first Cyclic Step so create a new step, right-click it and select Do Cyclic. Now right click Instructions > Add Flow Control > Continue so that we can add an attribute to monitor. Now right click Status > Add Attribute ATT_FLAPS_CURRENT_STAGE (check Show hidden tokens box) with a value of 3 (right click on the attribute > Edit).
8. Add VI Guidance for the trainee telling them that their flaps have been set correctly. Right click on Continue > Instructional Aids > VI Guidance. Inside any of the dialogue boxes for the VI Guidance, you can right click, select Attribute, then select ATT_TIME_COUNTER_1 to return the value of that counter at the time this VI Guidance is called.
Remember, you can’t just copy and paste the dialog from the boxes above into the debrief section because the stored attribute won’t carry over. Set it separately. Also, when the Attribute Characteristics window appears, just click OK.
9. After that, we want to Set Local Parameter for Steps to equal Steps + 1 as shown below. This will tell the agent later, that we've completed one of the steps. Right click on the VI Guidance > Set Local Parameter > select Steps, click on the “…” button > Local Parameter > Steps. Select + from the drop down menu below that and type 1 in the Add Value box.
10. Finally, if we let this step go, it will repeat itself constantly as long as the condition is being met. Since we don't want to keep adding to the value of Steps, we will add an End Cyclic Step here. Right click on the Local Parameter > End Cyclic Step.
Your agent should look something like this:
What will happen now is that the process will keep moving forward through the agent as a whole, almost as if it has skipped this step. But in reality it is constantly checking for the condition within this step to be satisfied, so once it is, this step will immediately be completed.
11. Now we want to set a Cyclic Step to check the trainee’s throttle movement, so we'll set up a step exactly as above, except that we'll monitor the attribute ATT_THROTTLE_CMD_SCALAR (check Show hidden tokens box) checking if it's in the range 0 – 25.
The step should look something like this:
12. Since we also want to monitor the altitude, we'll do the same Cyclic Step setup once more, now monitoring the attribute ATT_ALTIMETER_ALT_FEET for a range of 0 - 5,000 feet.
The step should look something like this:
13. Now that we'll be checking for all of these at the same time, we want a step that will tell us when they've all been completed. This will be the regular step that actually stops the agent from progressing until all tasks have been completed. Since we set the Local Parameter of Steps to add 1 to the value every time one of the tasks has been completed, we know that once the value of Steps hits 3, the trainee is ready for landing. Create a new, regular step with a Continue and right click on Trainee Info, compare the Local Parameter of Steps to be equal to 3, and then add some positive reinforcement below telling the trainee to land the aircraft.
14. Finally we should end the scenario by creating a new step with a Continue. Right click Status and check for the attribute ATT_IS_ON_GROUND (check Show hidden tokens box) to be true. This will tell us that the trainee has landed, at which point we should give them some positive reinforcement along with the time it took them (ATT_TIME_COUNTER_1).
15. Add a small timeout. Right click on the VI Guidance > Timeout > change Duration to 4.
16. Finally, add a Scenario End. Right click on the timeout > Instructional Aids > Scenario End. You can leave the default and click OK.
The steps should look something like this:
Sample Debrief Page: