modl.ai
|
A bot represents a player that explores your levels during test runs. To use a bot in your project you need to assign a player prefab for modl to control as your bot, define input variables and configure the exploration space within your game. The modl:test plugin provides the exploratory algorithm for your bot to use.
The information below describes the properties in the bot configuration window and how to configure a bot.
To open the bot configuration window, go to modl > Bot Configuration. The table below describes the properties in the window and how to use them:
Section | Property | Description |
---|---|---|
modl Project ID (Asset Store only) | Add your project ID. You can find your project ID in the modl.ai platform URL after. | |
Bot Control | Configure your bot, assign input variables and start a preview. | |
Player | Select a Player prefab from your game as the bot. | |
Input variables | Select input variables that you want modl to use to operate your bot. | |
Preview Bot Input | Preview modl:test operating your with the input variables you defined. | |
Exploration Behavior | Configure and preview the classes you want modl:test to report on. | |
Exploration space | Configure an exploration space for the bot to explore. The exploration space defines what you want the bot to explore and how modl:test knows if your bot reaches a new state. The bot tries to reach as many different exploration states as possible. | |
Interval | Adjust how many Unity units modl:test counts as a game state. During test runs, your bot compares two recorded game states and determines if they are different based on the interval size you set. One interval is one Unity unit. | |
Preview Exploration Space | Preview your bot in the exploration space. | |
Game State Variables | Add the classes and parameters you want modl:test to report on and restore within a game state. For example, if you want to receive more detailed information about where the bot has been in your level, add the player position class. You must add any variables you’ve defined in the exploration space. Enable Read Only if you want to track a property for reporting but don’t want to reset the same property when modl restores the game state. You must not enable Read Only on any game state variables that control exploration, such as position. | |
Preview Game State Variables | Preview your game reloading into previous states. Manually move your character around the scene to record game states and observe if modl resets your tracked variables as expected. | |
Full Bot Preview | Preview your bot configuration. In-editor modl testing uses a random exploration to preview your configuration. To use the AI exploration, upload your build to the modl.ai platform. Make sure you can see your bot moving around and game states reloading. | |
Save Setup | Save your configuration settings. |
To assign a bot, add input variables, configure the exploration space and configure any game state variables in your project, use the following steps:
If you notice that your bot isn’t moving in preview, make sure your input code includes the MODL_AUTOMATIC_TESTING
scripting define to allow modl:test to control your bot. For more information, refer to Configure your code.