Search Unity

[WIP]Artificial Neural Network Builder

Discussion in 'Works In Progress - Archive' started by jister, Mar 30, 2016.

  1. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    hey, dunno if you ever heard of Neural Networks?
    In short it's what sits behind your google search or Image, letter, pattern, facial recognition. It can predict the future :), make choices and evolve... (my interests for this is game AI)
    here is wiki on ANN's or Daniel Shiffman in his great book "the nature of code".
    anyway if you're a programmer and never checked this, i urge you to do it because it's mind blowing :)

    ok so i did some experiments with ANN's, only scratching the surface of it's potential, and want to know more and get a deeper understanding. That's why i thought I'd write my own visual tool to build different networks on the spot where i have possibilities to changes the most important parameters or functions a see the changes happening.

    (Web build proof of concept)
    https://dl.dropboxusercontent.com/u/32556668/MachineLearning_Web/index.html (doesn't always load, is WebGL still very buggy?)
    picture for people who don't like to click links:
    Screen Shot 2016-03-31 at 12.18.36.png
    here's what i have now. you can make layers and node, add nodes to layers and connect nodes to each other (generates a random weight between -1and 1).
    the node has a small UI where you can choose the Activation Function and the Evaluation Function for that node, if you select an outgoing connection you can see it's weight on top of the node as W: ...

    what I'll add:
    - different ways to "feedforward" input.
    - A (Graph) visualizer for the result in 2D and 3D
    - More evaluation functions (also still need to implement back prop)
    - modulation functions (for this i'm thinking CPPN, the modulation is primarily to manipulate visualization)
    - Possibility to save the result
    - possibility to save to network
    - ... hopefully lots more.

    and finally some questions :)
    - first, are you interested in a sandbox like this?
    - second still need to think of a generic way to feed the net with input data of the user's choice... and something to convert the output to what the user wants.
    I was think just uploading files: Like uploading and image would extract an array of pixels value's, a sound file would do this for it's frequency or amplitude... text file would do this for char's and so on.
    only that sound like a heavy piece of coding, almost bigger than the whole Builder itself :)
    so any idea's on how to feed it with array's of input are welcome!! :)
     
    Last edited: Mar 31, 2016
    Lusiani likes this.
  2. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    wauw Google just released this in browser!!!!!!! :)
    http://playground.tensorflow.org/
    I'll finish my version anyway, just for learning.

    here's an update:

    https://dl.dropboxusercontent.com/u/32556668/MachineLearning_Web/index.html

    I should add some instructions, like only neurons that are in a layer can be connected.
    If you click on a Layer in the layer menu, you'll get the weight matrix in the network menu.

    for the rest, only thing you can do until now is build a FF network. so no training or backpropagation yet.

    Let me know if you tried it out.
     
    Last edited: Apr 13, 2016
  3. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    allright things are coming along fine: added a file browser to load a file for input. Up till now i plan on allowing Audio, Images, Text and CSV files. (also want to save the weight matrix as csv so you'll have an option to build a network from a csv)
    Audio node looks like this atm:
    Screen Shot 2016-04-21 at 11.37.22.png

    it has a data point for the Samples array, for the frequency, the rms, the amplitude and the raw data array. this are all streaming and i wonder if things like the sample array should be accessible all at once (so like 1024 input i.e.)
    Like image recog. uses all the pixels at once as inputs.

    anyway any suggestion for other file type that would make sense as neural network input? and if so which data and how should it be accessible?
     
  4. Lusiani

    Lusiani

    Joined:
    Jun 14, 2016
    Posts:
    1
    Wow that's really a remarkable project! I'm working too on a project regarding Neuroevolution for my matura, but I'm don't have much experience in Unity3d or programming in general, and the only thing I've been able to create so far are same slimes that learn to go to center of the scene :( ... . Anyway I think your work is really good and well done! (sorry for my bad english, I'm italian)
     
    jister likes this.
  5. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    How would you go about designing a neural network-like system that is not an AI system, but a system for sending/receiving messages between nodes and end points?

    It would have to:
    1. Be made up of interconnected major, minor nodes, end points.
    2. Major nodes communicate only the nodes that are directly connected to it.
    3. Major nodes can select which connected nodes to communicate with. e.g. all nodes, major only, minor only, a specific node.
    4. Communications are in two types: 1) simple messages. 2). messages with payloads.

    I already can imagine how I could do this in C#. But might this be better handled with a state machine like Mecanim, PlayMaker; or a behaviour tree like Behaviour Designer? Or some other technology/Asset.
     
  6. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    why use anything other than OOP for this?

    PS: this project got on hold, I will upload a copy here for anyone interested to work on it.
    https://drive.google.com/file/d/0BzsZ4o9QXFtlaXpEZmZNQVpfeU0/view
     
    Last edited: May 30, 2017
  7. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749