GithubHelp home page GithubHelp logo

neural-network's People

Contributors

cassiecorey avatar jburroni avatar nxxcxx avatar scottjordan avatar tvachnad avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jburroni aamgalan

neural-network's Issues

keep js dependencies internal (for offline work)

Namely, in the simulation_page.html, can we just download anything like this one needed for logging: https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js and keep it in the vendor js folder, rather than get it every time?

Also, the main homepage is waayy to scripty for our minimal needs (sorry Cassie). We could accomplish the same with something vastly simpler than bootstrap.

For both of these, for example if we're at an ONR conference with no internet (they have high security and no wifi allowed), we want to be able to launch the simulation without needing to be online.

the number of signals is bigger than the number of axons

This is not feasible so we should check what are we doing wrongly.

Add this assert to spot the problem:

        // if(n.astrocyte.availableEnergy<=astrocyte_settings.minEnergy)
        // n.astrocyte.replenish();
    }
    assert(this.allSignals.length < this.allAxons.length);
    if(this.logger != null){
        if(this.logger.getLastEntry() >= 19){
            this.logger.sendToServer();

Deprecate old menu options

Max signals and max axon distance are no longer relevant or accurate. Max neuron connections is also broke/invalid? On a related note, Master branch has had many menu terminology updates, and there might be a conflict during merge w/ the newly deleted menu options.

Need to change checking of if the neuron can fire during update

// update neurons state and release signal
        for (ii = 0; ii < this.allNeurons.length; ii++) {
            n = this.allNeurons[ii];
            // the astrocyte we're taking energy from
            if (n.receivedSignal) { // Astrocyte mode
                if (n.fire() === true) {
                    var a = n.canFire();
                    if(a === true){
                        if(this.logger != null){
                            this.logger.addToLastEntry(ii+1);
                            this.logger2.addToLastEntry(n.acc+0.125);                   
                        }
                        a.deplete();
                        n.lastSignalRelease = currentTime;
                        this.releaseSignalAt(n);
                    } else if(a >= 0){
                        //log misssed activation astrocyte energy
                    }
                }
            }

To log the energy of the astrocyte when it didn't have enough energy to fire, but the neuron would have fired, the order of checking if the neuron will fire needs to change. First check if the neuron will fire, then check if the neuron can fire from the astrocyte. This also means changing the way that canFire() is defined. A helper function is also needed to return the value of the astrocyte.

d3.csv is asynchronous

this code:

    //load connectivity matrix
    d3.csv("./static/models/connectivity.csv", function(data) {

        for(var q = 0;q<188;q++){
            self.connectivityMatrix[q]=data[q];
        }
    });

is the code to load the connectivity matrix. The code that follows assume that when its run, the connectivity matrix is already loaded, but that is not true as d3.csv is asynchonous

Astrocyte Regeneration is on global timer and not synced on ticks

The regeneration is not synced to the ticks that update the network but a clock on the users computer. This leads to the regeneration time getting out of sync with the simulation when the simulation slows down.

Proposing this change to the function to have it update when neuralNetwork.update() is called

    NeuralNetwork.prototype.updateRegeneration = function(currentTime) {
        var timeSinceLastUpdate = currentTime - this.lastRegenUpdate;
        if(timeSinceLastUpdate >= astrocyte_settings.frequency){
            astrocyte_settings.replenishEnergy += this.regenSign*astrocyte_settings.amplitude;
            this.lastRegenUpdate = currentTime;
            if(astrocyte_settings.replenishEnergy > astrocyte_settings.maxThreshold){
                astrocyte_settings.replenishEnergy = astrocyte_settings.maxThreshold; 
                this.regenSign *= -1;
            } else if(astrocyte_settings.replenishEnergy < astrocyte_settings.minThreshold){
                astrocyte_settings.replenishEnergy = astrocyte_settings.minThreshold;
                this.regenSign *= -1;
            }
        }
    }

Neurons Decay membrane potential on a timer not on ticks

The Neuron.prototype.decay function isn't used and neurons only decay based on the decay function which use a timer. Need to make this depend on a tick based clock. Proposing this change where if a neuron doesn't receive a signal then it decays using the decay function:

Neuron.prototype.decay = function(){
    this.acc = 0.9 * this.acc;
    if (this.acc < 0)
        this.acc = 0;
}
Neuron.prototype.fireIfCan = function(neuralNet, currentTime)
{
    var ret = [false, null];
    if (this.willFire())
    {
        if (this.receivedSignal) {
            var astrocyte = this.astrocyteWithEnergy();
            if (astrocyte != null) { // Astrocyte mode
                var prevacc = this.acc;
                this.fire();
                ret = [true, prevacc]
                astrocyte.deplete();
                this.lastSignalRelease = currentTime;
                neuralNet.releaseSignalAt(this);
            } else {
                ret = [false, this.astrocyte.availableEnergy];
            }
            this.receivedSignal = false; // if neuron received signal but still in delay reset it
        } else {
            this.decay();
        }
    } 
    return ret;
}

both html pages broken?

The homepage links to the wrong simulation page, and neither seems to be displaying content as before.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.