Hi,
I have a question about feasibility of some stuff in Unreal Engine.
I would like to use the UE to play some physics simulation results, but this simulation requires an offline learning process.
This learning process is based on a genetic algorithm restarting many times the simulation and learning parameters for it.
So what I would like to achieve is :
- Having the simulation context that uses UE physics engine
- Being able to run the simulation “offline” (without rendering it)
- Having my genetic algorithm constantly running the simulation to evolve stuff I need to evolve
- Obviously, being able to run the simulation using UE rendering, but this one is “trivial”.
Can I do this kind of things (or similar stuff) using UE ?
I am not sure I have been very clear on my needs, if not I’ll be pleased to answer questions
Thanks for everything !
Zouch
EDIT:
Just to clarify a bit, here is how stuff may look when called during learning process (pseudo code) :
double fitnessFunction()
{
// First, get a new clean physics simulation context
Simulation simulation = buildNewSimulation();
double fitness = 0.0;
int stepCount = 5 * 60; // 5 seconds of simulation at 60 fps
for (int i = 0; i < stepCount; ++i)
{
simulation.step(1.0 / 60.0); // Advance one step of simulation, updates physics, etc
fitness += rewardGivenSimulationStatus();
}
// We are done, clear simulation
simulation.clear();
return fitness;
}
And Simulation::step() might look like
void Simulation::step(double dt)
{
// Do some pre computations
preComputations(dt);
// Update physics engine
phsicsEngine.step(dt);
// Do some post computations
postComputations(dt);
}
EDIT 2 :
I think it is worth mentionning that there is no problem if the engine needs to be running during learning, I just need to have the control over the physics engine, choose when to step it, with my given delta time, and prevent the game engine to update it by itself.