Running with a Standalone Environment from CLI
Running Schola from the command line interface (CLI) is a powerful way to interact with the system. This guide will walk you through the steps to run Schola from the CLI, including how to set up your environment and execute commands.
Building Your Environment
Before you can run a standalone executable from the Command-line with Schola, you need to build your environment into a standalone executable. This involves packaging your Unreal Engine project which is detailed in the official unreal engine documentation.
Running From CLI
To launch a standalone environment (i.e. A game built in Development or Shipping mode), you can use the following command:
schola-sb3 --launch-unreal --executable-path <PATH_TO_EXECUTABLE>
schola-rllib --launch-unreal --executable-path <PATH_TO_EXECUTABLE>
The <PATH_TO_EXECUTABLE> should be replaced with the path to your packaged Unreal Engine executable.
Headless Mode
Schola can be run in headless mode, which is useful for running scripts or automating tasks. To run Schola in headless mode, use the following command:
schola-sb3 --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --headless
schola-rllib --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --headless
This command will start Schola without the graphical user interface (GUI), allowing for accelerated simulation speeds.
Fixed Simulation Timestep
Schola allows you to set a fixed frames per second (FPS) for the simulation. This can be useful for ensuring consistent performance across different runs. To set a fixed FPS, use the following command:
schola-sb3 --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --fps <FPS>
schola-rllib --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --fps <FPS>
Replace <FPS> with the desired frames per second value. For example, to set the FPS to 30, use:
schola-sb3 --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --fps 30
schola-rllib --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --fps 30
Controlling The Map
Schola allows you to specify the map to load when launching the environment. To do this, use the —map argument followed by the path to the map. For example:
schola-sb3 --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --map <MAP_NAME>
schola-rllib --launch-unreal --executable-path <PATH_TO_EXECUTABLE> --map <MAP_NAME>
The map should be specified as a relative path from the Content folder, with content replaced with Game For exammple /Content/LevelOne/Map would be specified as Game/LevelOne/Map.
Additional Settings
For details on settings specific to Stable Baselines 3 and RLLib see, schola-rllib and schola-sb3 respectively.