Blueprint Only Genetic Algorithm

I present to you a few days worth of work. A genetic algorithm written in entirely blueprints. It was an experiment in how complicated a blueprint can get. Hope you enjoy! <3

Mind you it doesn’t look too complicated but there are multiple areas in which this can fail in a bp infinite loop, like selecting parents or reproduction. GA’s are complicated but blueprints seem to handle low populations with a decent amount of generations. If only we could heighten the infinite loop timer.

There’s a node for that in Rama’s Victory Plugin

/** Call this periodically in a huge loop you are intentionally using to reset the BP runaway loop system. Caution, if you have an infinite loop this will permanently hang your system until you turn your computer off. Use very very carefully! When constructing a new loop and you are not sure if it is totally stable, do NOT use this node! Always test new loops normally to ensure you dont truly have a runaway loop that would hang your computer forever. */
UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
static void Loops_ResetBPRunawayCounter();

Ohh wow, this looks useful.

I wonder if you’d be able to post the project file up?

I have a small monitor and it’s hard to make out all those Blueprint nodes.

What is it for? Performance?

Very cool, good job! Blueprints are indeed very powerful.

Did you try setting Edit>Project Settings>General Settings>Blueprints>Maximum Loop Iteration Count to a higher number?

2 Likes

Hi Saxon,

I wonder if you could share the source?

If you can, I’ll be converting the whole thing to C++ for the community.

Please don’t worry if it only works on an early version of the engine, I can update them both to run on later versions too.

Best,
James