Search Unity

[RELEASED] Learning AI - easy :)

Discussion in 'Assets and Asset Store' started by Oksana-Iashchuk, Dec 13, 2022.

  1. Oksana-Iashchuk

    Oksana-Iashchuk

    Joined:
    Sep 10, 2012
    Posts:
    126
    Asset store link - https://u3d.as/2Xwn
    Short Video -

    Long Video -


    Abstract

    The Learning AI package aim to provide easy learning curve for new comers at neural-network programming or good starting point for experienced programmers without any external libraries or hidden code. It contains demo scene with working example of simple neural-network model out of the box and small bonus scene just for fun image processing. The core code is the port of convnetjs project and Unity3d adaptation of two examples from https://github.com/karpathy/convnetjs. The best approach to get more information is to dig deep in to https://cs.stanford.edu/people/karpathy/convnetjs which has great explanation how and why it does work.



    Environment

    On your developer machine it would require to install Unity 2020.3.0.f1 or latest. There is no external libraries or platform dependences.



    Package content

    As mention earlier there are no externals, so let’s look at what you get. The package contains ported code from convnetjs git located at `Assets/Convnet/Sources` folder and demo scenes and code of examples adaptation at `Assets/Convnet/Demos`.



    ImageRegression demo

    The demo scene is located at `Assets/Convnet/Demos/ImageRegression.unity` It has two images which has connected via neural network. The left image contains original one and right one is output image. On ImageRegression game object you could find controller script: ImageRegressionController.cs.

    In process of execution fully-connected model contains 7 layers of 20 neurons each do remember left side image in internal neurons. With each iteration resulting right image will get closer and closer to the left one. Fill free to experiment with the code as well as dig down with debugger to learn internal structure if you like to have deep knowledge of basics of neuro networking.


    Snake demo

    The demo scene is located at `Assets/Convnet/Demos/Snake.unity` It has playbox with preset of collectable objects (Collectible.cs) and player object controlled with Snake.cs file. UI and game logics controlled at ScakeSceneController.cs file.




    Collectible.cs – Implement collectable objects life cycle via internal timer which respawn collectible at new random position or on event of collision with a player. Collectible object has two types: food or poison which will affect digestion signal.


    SnakeSceneController.cs – quite striate forward controller of UI (save,load,training) and initialization.


    Snake.cs – All player logic happens here: neural-network creation, eye array creation and processing and applying network output at the player. Save and load to file: `Assets/Convnet/Demos/Resoures/snake.txt`. It use convnetjs library objects like deepqlearn.Brain (Assets/Convnet/Sourses/deepqlearn.cs).



    Convnet code

    The convnet code was gently ported from https://github.com/karpathy/convnetjs repository to C-Sharp library at `Assets/Convnet/Sources` of this package. All original comments are remaining the same place at the code with my little addons. It’s well documented at code originally so please fill free browse the code to get answers “how it works”. For theoretical materials visit Stanford University https://cs.stanford.edu/people/karpathy/convnetjs page.




    Contacts

    Fill free email us: orangetree.developers@gmail.com or visit our website https://orangetree.tk
     
    Last edited: Dec 14, 2022