Configure Scenarios
are situations where your agent needs to behave differently to succeed.
Scenarios are created by carving out sections of the simulation space, as defined by specific configurations of variables and variable ranges. This allows you to train skills only in the scenarios where they will need to perform, leading to more efficient training and better performance. Selectors learn to recognize scenarios and pass control to the appropriate specialist skill to handle the scenario’s demands.
Types of Scenarios
How you define scenarios depends on the type of sensor variables you are working with.
Discrete variables are categories that describe a particular scenario. For each scenario, there is likely a perceptor in the agent (a machine learning model for example) that inputs the sensors, processes the sensor values, and outputs the discrete variable category.
Continuous variables are numbers. When they are used to define a scenario that one number value defines the section of the space that your agent will explore for decisions.
Sometimes a scenario is better defined by a range of continuous values than by a single continuous value. In that case, the scenario would be defined by a continuous variable range.
Here are some examples of how scenarios can be defined in different ways:
Use Case | Discrete Variables | Continuous Variables | Continuous Variable Ranges |
---|---|---|---|
Drone Control | windy, far_from_charger, low_battery | windspeed=20 (knots) | windspeed between 20-40 (knots) |
Autonomous Driving | city, highway, high_traffic | vehicle_speed=65 (miles per hour) | vehicle_speed between 65-85 (miles per hour) |
Cybersecurity Network Optimization | normal, high_traffic, cyberattack | site_traffic=0 (clicks per second) | site_traffic between 100-150 (clicks per second) |
Process Control | startup, steady_state, shutdown | product_thickness=50 (milimeters) | product_thickness between 49.94-50.06 (milimeters) |
Machine Control | break-in, normal, wearing_out | rpm=280 (revolutions per minute) | rpm between 250-295 (revolutions per minute) |
Scenarios Example
Let’s say that we are creating an agent to plan the operations of a restaurant with varying demand for three different recipes. We could create three different scenarios:
Low demand: 30 recipe A, 20 recipe B, and 10 recipe C
Normal demand: 60 recipe A, 45 recipe B, and 10 recipe C
High demand: 100 recipe A, 50 recipe B, and 25 recipe C
Once you defined these scenarios, you could set the agent to train in the low demand scenario until the success criteria is reached. Then it would move to normal demand, and then to high demand. We would expect the agent to learn faster as it progressed through the scenarios, with cumulative knowledge building over time.
Set Up Scenarios in the UI
Add Scenarios to Projects
Add scenarios to your project by clicking on Scenarios from the lefthand menu to open the Scenarios page.
Click Add scenario to create a new scenario. Give your scenario a name and then click Add condition to configure it. You will then have the option to choose from any of the available sensor variables and apply conditions to them.
For continuous variables, select Is and enter the exact value.
For continuous variable ranges, select Is between and enter the range.
For discrete variables, select Is element of and enter the possible values.
Create Scenario Flows
In addition to identifying scenarios, Composabl also lets you teach your agents about how scenarios relate to each other. To do this, you can build scenario flows to establish sequences of scenarios for the agent to practice.
Without scenario flows, the training platform will connect scenarios at random. But sometimes it is important for agents to practice scenarios in a specific order. For example, it might be important to practice flying a drone in high wind and then landing in the same conditions. Or an agent managing a production line might need to practice going from a scenario in which raw materials are scarce to one in which material costs rapidly rise. By creating a scenario flow, you can ensure that a given sequence of scenarios will be included in training.
Once you have scenarios built, create sequential sections of the task by clicking Add section.
After creating all the sections you need, drag and drop the scenarios into the sections.
Create as many flows as you need to capture the different scenario sequences your agent will need to navigate.
Add Scenarios to Skills
Scenarios are added to agents as part of configuring skills. Scenarios are added to skills so that skills know what specific conditions they need to master. Not all scenarios are relevant to all skills. For example, a drone landing skill doesn’t need to practice taking off in windy weather.
The configurations you set up when building the scenario flows will appear in the skill configuration modal. For each section of the process, as defined by the flows, tell the selector which scenarios it should apply by checking the boxes next to each scenario.
Last updated