GameMaker (2.3)
Icon

Neural network

Vishnya Games

You must be logged in to obtain assets

Description

Neural network in GML!

Features:

  • gms 2.3 abilities!

  • simple single-layer perceptron

  • simple training

  • easy way to train neural network with limit in iterations and error level

  • save and load networks

Functions:

  • nn_create() - create neural netork, return id

  • nn_destroy(id) - destroy neural network

  • nn_add_neuron(id) - create new neuron in current network

  • nn_get_output(id, input_list) - launch neural network and return list with output

  • nn_train_train(id, train_id) - train neural network

  • nn_get_neuron_number(id) - return number of neurons in network

  • train_create() - create information for training neural networks, return train_id

  • train_add_input(train_id, val, val, ...) or train_add_input_list(train_id, input_list) - add input signals for training

  • train_add_output(train_id, val, val, ...) or train_add_output_list(train_id, output_list) - add desired signals for comparison

  • train_destroy(id) - destroy current train

You can now create neural network struct using network = new neural_network(n); !

And use this methods:

  • network.destroy()

  • network.add_neuron()

  • network.get_output(id, input_list)

  • .. other functions from list above ^ ...

  • buffer = network.save_to_buffer()

  • network.save_to_file(fname)

  • network.load_from_buffer(buffer)

  • network.load_from_file(buffer)

Some examples inside.

This is simple single-layer perceptron, I hope this example will help many people to understand that neural network is easy.

( Don't forget to rate :D )

End User Licence Agreement (EULA).

Age Rating: 4+

Versions

GMS1 - Version 1.0.0. Published February 17, 2017

GMS2.3 - Version 2.3.1. Published September 16, 2020

Implemented 2.3 features:

  • Neural network wrapper using constructors: net = new neural_network(...);

  • All functions in one file

New abilities:

  • Save and load from buffer and file!

Updated examples

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait