Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_ANN

Plugin, ACE table, Discussion thread
Dependence: None


Introduction
Artificial Neural Network, using back-propagation and one hidden layer.
Reference: 程式人雜誌4月號, (Python version)

Usage
Sample capx
Sample capx - assign inputs/outputs by dictionary
Define network
There are 3 terms of a network -
  • Input variables: defined at properties table, or call "Action:Define inputs", or "Action:Define inputs by dictionary".
  • Hidden layer: the node  count in the hidden layer. Defined at properties table, or call "Action:Define hidden node count"
  • Output variables: defined at properties table, or call "Action:Define outputs", or "Action:Define outputs by dictionary".
The format of input variables and output variables is
Var1,Var2,...
The Var1 could be a string "A" or a number 0.
Training
  1. Call "Action:Set input" to set each input value, and call "Action:Set target" to set each target of output value.
  2. Call "Action:Train" to do training, user could get error of this training by "Expression:TrainErr".
Recalling
  1. Call "Action:Set input" to set each input value.
  2. Call "Action:Recall" to do recalling. Then get each output value by "Expression:Output".

Save training result
The content of network could be got by "Expression:AsJSON". Call "Action:Load" could re-load this content of network.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About