AlejoLab
  • Start
  • Blog

Trippy dot art generated by artificial neurons

5/11/2014

0 Comments

 
Picture
ANNDART stands for Artificial Neural Network Dot Art. It's a toy I created testing an artificial Brain framework. Notice I say "Brain" because I avoid saying it's a proper neural network. Proper ANNs are supposed to have learning and training capabilities and are more strictly defined mathematically. Mine doesn't have that because my intention is to use it with random mutations in genetic algorithms with natural-artificial selection.
Picture

How it works

ANNDART computes the X,Y values for each dot and outputs a resulting colour on every frame.
The user can click any of the four grids to generate new offspring with some mutations replacing the other three grids.

The structure of the neural net is based on layers:
  • Input layer, with two input neurons: X, Y (from -5.5 to 5.5) Notice each grid is made of 10 dots centered.
  • 2 Inner layers with 2 neurons each (arbitrary decision by me. Can be easily changed in code)
  • Output layer, with three output neurons: R, G, B values for the colours (clamped from 0 to 255)
Each neuron is connected to all the neurons in the next layer. Every value received from an input is multiplied by a weight and added to an internal neuron value. The neuron uses a transfer function to interpret that value and send it to the neurons in the next layer.

The transfer functions can be:
  • sum: Send the sum of all the weighted inputs as it is.
  • step: Send a 1 if the internal value is equal/higher than an internal constant (mutable) and 0 if lower. This is the kind of transfer function you find on a perceptron neural net.
  • sigma: Applies the sigma function to the internal value.
  • linear:  Applies a linear function (y=ax+b) to the internal value using two (mutable) constants.
  • quadratic: Applies a quadratic function (y=ax^2+bx) using only two (mutable) constants.
  • average: Divide the internal value by the number of inputs, which is the average weighted input value.
  • accumulator: Accumulates the internal value over cycles. When a threshold (mutable) is reached the whole value is sent and reset. This is what causes the blinking in some of the dots. This behaviour slightly resembles biological neurons which only trigger after a specific electric differential has build up inside.

When offspring is created the new copies are mutated. Mutation can introduce random changes in the weights of the connections, the transfer function used and the two internal constants used by the transfer function. The structure of the net is not mutated in ANNDART although it could be implemented.

Enough talking! Download the standalone and generate some cool art. If you tweet or share cool images give me a shout at @alejocamaleon
Download ANNDART
For windows only right now.
Ask in comments for other builds.

Other applications

Picture

These eye-like creatures are driven by this very same brain class.
In this case the mutations are introduced by a predesigned reproduction behaviour.

What would you build using a system like this?
0 Comments



Leave a Reply.

    Alejo AC

    AlejoAC
    Indie game designer
    and Coach

    Like what you see?

    Archives

    April 2022
    November 2021
    April 2021
    December 2019
    June 2015
    November 2014
    September 2014
    February 2014
    January 2014
    November 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013

    Categories

    All
    Artificial Life
    Building The Habit
    Business
    Comic
    Creativity
    Game Design
    Group Dynamics
    Log
    Marketing
    Meaningful
    Minecraft
    Nlp
    Oppa! Video Project
    Painting
    Performing Arts
    Productivity
    Projections
    Ptower
    Reading
    Wedding
    Writing

    RSS Feed

Powered by Create your own unique website with customizable templates.