• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Asset - Scripts Simple Multi-layer Perceptron (free)

drandula

Member
Simple Multi-Layer Perceptron in GML
Fully-connected multilayer neural network scripts with backpropagation for GameMaker Studio 2.3.

1614976904804.png

Download links:
YYG Marketplace
Itchio
GitHub

This asset is simplified version of my MLP scripts, which I have been writing. Later they will be published too as separate asset.

Asset includes three different MLP versions:
  • Array
  • Grid
  • Mini
Array and Grid are different how they store and calculate weights. Mini is similiar to Array, but it's more simplified.
Array is easier to read and you can introduce yourself how MLP works. Grid-based MLP calculates faster than Array, but needs to be explicitly destroyed and it is harder to read.

Included learning methods:
  • Stochastic Gradient Descent.
    • SGD is supervised learning algorithm, which uses backpropagation.
    • Supports using minibatches.
    • Mean Squared Error is only cost function included in this asset.
  • Genetic Algorithm.
    • Genetic Algorithm here is just one simple way of implementing it. Steps are 1) Selection, 2) Offsprings, 3) Mutations.

As these are just simplified versions of original scripts, I have not throughly tested these, and I don't quarantee working.
Also this asset does not include examples of original scripts.
 
Last edited:
D

Deleted member 16767

Guest
Hi. I have a question. Can this be used like this... the AI knows which undo/redo (with buffer surface) you are at? And if it does, which of the plethora of methods that you mention, would be best suited for it?
 

drandula

Member
Hi. I have a question. Can this be used like this... the AI knows which undo/redo (with buffer surface) you are at?
I am not yet sure what you are after, do you mean undo/redo system for drawing application? I don't think that would be feasible, and would instead approach this problem with conventional ways as
you really want robustness for the system.

In undo/redo system what would be input and output for mlp, and are they correlated in a way they can be predicted?
For supervised learning you need to have example input-output pairs: give input for mlp, which it takes prediction of, then compare prediction against actual target output.
So you would have to design what are inputs and desired outputs, and how you collect this data so you can train your network.
 
Top