How to speed up the engine? (for reinforcement learning)

Hello there!

I am using Unreal Engine with the AirSim plugin for Reinforcement Learning. The process is automated so that when I click play in the Editor and run a script outside the engine the learning process happens. Basically I have a drone flying in an environment (level) by itself and the algorithm learns and improves its flight. Since the drone is learning through experience the faster the simulation happens the best.

Is there a way to speed up the engine without damaging the physics?

(Also I don’t need to see what is happening so if you know a way to save processing power by turning of the visual rendering, I would be very thankful :slight_smile: )

Use the Global Time Dilation:

UGameplayStatics::SetGlobalTimeDilation(GetWorld(), FMath::RandRange(0,1));

You can find the Blueprint version of this function here:

you could also use the slomo console command and use a number greater than 1, so 2 for double the normal speed.

In settings.json file, you can change “ClockSpeed”: 1 to a larger number to speed up.
Again in settings.json file, you can change “ViewMode”: “” to “NoDisplay” to turn off visuals.
As described in here: AirSim/settings.md at main · microsoft/AirSim · GitHub