💃 Ross Makes Games 💃

Fitting a grid to arbitrary points with reinforcement learning and Unity ML Agents


For Ludum Dare 48 I tried out Unity ML agents. The idea was to find a way to take arbitrary transform data, and fit it to a grid such that I could start reasoning about level data through grid block neighbors.

This was an experiment to determine the feasibility of the approach as a pre-processing step in a larger plan to apply wave function collapse like logic to non-discrete levels.

The reward function was a normalized sum of two criteria:

These were offset so a negative reward was produced in cases where these criteria were badly met.

There were also a number of failure cases when the grid size got too small/large that would restart the agent.

Some noteworthy learnings

Failings and potential improvements

#experiment #gamedev #indiedev #machinelearning #reinforcementlearning #unity #unity3d