GithubHelp home page GithubHelp logo

mspringett / bionet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openworm/bionet

0.0 2.0 0.0 27.67 MB

Artificial biological neural network

License: BSD 2-Clause "Simplified" License

C++ 49.13% C 46.42% Makefile 0.83% Batchfile 0.11% Shell 1.01% Java 1.21% AMPL 1.29%

bionet's Introduction

Bionet

#Artificial biological neural network

Bionet simulates a biologically inspired neural network composed of sensory neurons, interneurons, and motor neurons which can be connected in arbitrary configurations. Signals propagate through the network one synapse at a time. A network behavior is defined as a sequence of sensory-motor neuron firings.

Bionet also possesses a network morphogenesis capability: An isomorphic network reproduces the behaviors of another network without knowing its interneuron configuration. A homomorphic network additionally mirrors the interneuron configuration of the other network.

Bionet was inspired by OpenWorm (openworm.org), a project to model the C. elegans nematode worm in a high fidelity artificial creature. Although the connectome (neural network) of the worm is known, it is not known how it produces sensory-motor behaviors. Bionet is an attempt to do this. A network containing the C. elegans connectome is supplied with the distribution: CElegans_network.txt. This network has random weights and can be used to produce sensory-motor behavior sequences. The goal is to evolve other networks that perform the same behaviors, not knowing the original network weights. Since C. elegans has more than 3000 synapses, this is a daunting task. However, accomplishing it would be a significant step toward programming an artificial C. elegans.

In addition to Bionet, see the CElegans/Readme.txt for related projects that are specific to C. elegans.

##Required packages:

1. UNIX: the gcc compiler, make command, and the bash shell.
2. Windows: Microsoft Visual C++ 2012 (or later) IDE.
3. Pthreads.

##Optional packages:

1. Fourier Transform undulation behavior evaluation:
   FFTW3 Fourier Transform package: www.fftw.org
2. NEURON simulator evaluation:
   a. Generate and export C. elegans simulation with NeuroConstruct:
      github.com/openworm/OpenWorm/wiki/Running-the-C.-elegans-model-in-neuroConstruct
   b. Evaluate with NEURON simulator: www.neuron.yale.edu/neuron/
   c. If you have to compile sim/model/mod files for a new platform, see:
      www.neuron.yale.edu/neuron/faq#compilemod
      For example, to compile under UNIX/Linux:
      Run "modlunit filename" on each mod file, then run nrnivmodl to compile.
3. c302 simulator evaluation:
   a. Install python with neuroml, numpy, etc. packages. (Anaconda installs these).
   b. Install jNeuroML using link from c302 README:
      github.com/openworm/CElegansNeuroML/tree/master/CElegans/pythonScripts/c302 
   c. Download CElegansNeuroML from github.com/openworm/CElegansNeuroML
      into sim directory and unzip.
   d. Create sim/CElegansNeuroML/CElegans/pythonScripts/c302/c302_network.txt file with format:
	  Cells:
	  <neuron name>
	  ...
	  Synapses:
	  <source neuron> <target neuron> <weight>
	  (Example: "ADAL AIBL 0.5")
	  ...
	  Stimuli:
	  <neuron name>
	  ...

###To build:

UNIX: 
1. 'make'
2. For Fourier Transform undulation behavior evaluation: 'make fft_undulation_eval'

Windows: use VC++ solution and project files.

###Commands:

Create network:

bionet
   -createNetwork
   -numNeurons <number of neurons>
   -numSensors <number of sensors>
   -numMotors <number of motors>
   [-inhibitorDensity <inhibitory neuron density [0.0,1.0]>]
   [-synapsePropensity <synapse generation propensity (0.0,1.0]>]
   [-minSynapseWeight <minimum synapse weight (defaults to 0.0)>]
   [-maxSynapseWeight <maximum synapse weight (defaults to 1.0)>]
   [-randomSeed <random seed>]
   [-saveNetwork <network file name>]
   [-graphNetwork <graph file name ('dot' format)>]

Print network:

bionet
   -printNetwork
   [-connectivity (also print connectivity)]   
   -loadNetwork <network file name>

Graph network:

bionet
   -graphNetwork <graph file name ('dot' network)>
   [-title <graph title>]
   -loadNetwork <network file name>

Create network behaviors:

bionet (create random behaviors)
   -createNetworkBehaviors
   -loadNetwork <network file name>
   -behaviorLengths <sensory-motor sequence length list (blank separator)>
   [-saveBehaviors <behaviors file name>]
   [-randomSeed <random seed>]
bionet (create motor outputs from given sensor inputs)
   -createNetworkBehaviors
   -loadNetwork <network file name>
   -loadSensorBehaviors <behaviors file name>
   [-saveBehaviors <behaviors file name>]
   [-randomSeed <random seed>]
bionet (create undulation behavior movements)
   -createNetworkBehaviors
   -loadNetwork <network file name>
   -undulationMovements <number of sinusoidal movements>
   [-saveBehaviors <behaviors file name> 
      (behavior 0: with light touch stimulation; behavior 1: without stimulation)]
   [-randomSeed <random seed>]

Test network behaviors:

bionet
   -testNetworkBehaviors
   -loadNetwork <network file name>
   -loadBehaviors <behaviors file name>
   [-motorDeltaTolerance <minimum motor delta to print>]

Print network behaviors:

bionet
   -printNetworkBehaviors
   -loadBehaviors <behaviors file name>

Create homomorphic networks:

bionet (new morph)
   -createHomomorphicNetworks
   -loadBehaviors <behaviors file name>
   -loadNetwork <homomorph network file name>
   -populationSize <number population members>
   -numOffspring <number offspring per generation>
   [-parentLongevity <parent dies after this many offspring>]
   -numGenerations <number of evolution generations>
   [-behaveCutoff <stop evolution when this many members behave>]
   [-behaveQuorum <behaving member quorum required to advance behavior testing to next sensory-motor step>
      (defaults to immediate testing of entire behavior sequences)
	  [<maximum generations before advancing without a quorum>]]
   [-fitnessMotorList <list of motor outputs evaluated for fitness (0-n, comma-separated)>
      (defaults to fitness evaluation of all motor outputs)]
   -crossoverRate <probability>
   -mutationRate <probability>
   -synapseWeights <minimum> <maximum> <max delta>
   -synapseCrossoverBondStrength <probability of connected neurons crossing over together>
   -synapseOptimizedPathLength <synapse path length optimized as a group>
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-randomSeed <random seed>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (resume morph)
   -createHomomorphicNetworks
   -loadBehaviors <behaviors file name>
   -loadMorph <morph file name>
   -numGenerations <number of evolution generations>
   [-behaveCutoff <stop evolution when this many members behave>]
   [-fitnessMotorList <list of motor outputs evaluated for fitness (0-n, comma-separated)>
      (defaults to loaded list)]
   [-crossoverRate <probability> (defaults to loaded value)]
   [-mutationRate <probability> (defaults to loaded value)]
   [-synapseCrossoverBondStrength <probability of connected neurons crossing over together>]
   [-synapseOptimizedPathLength <synapse path length optimized as a group>]
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (new undulation behavior morph)
   -createHomomorphicNetworks
   -undulationMovements <number of sinusoidal movements>
   -loadNetwork <homomorph network file name>
   -populationSize <number population members>
   -numOffspring <number offspring per generation>
   [-parentLongevity <parent dies after this many offspring>]
   -numGenerations <number of evolution generations>
   -crossoverRate <probability>
   -mutationRate <probability>
   -synapseWeights <minimum> <maximum> <max delta>
   -synapseCrossoverBondStrength <probability of connected neurons crossing over together>
   -synapseOptimizedPathLength <synapse path length optimized as a group>
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-randomSeed <random seed>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (resume undulation behavior morph)
   -createHomomorphicNetworks
   -undulationMovements <number of sinusoidal movements>
   -loadMorph <morph file name>
   -numGenerations <number of evolution generations>
   [-crossoverRate <probability> (defaults to loaded value)]
   [-mutationRate <probability> (defaults to loaded value)]
   [-synapseCrossoverBondStrength <probability of connected neurons crossing over together>]
   [-synapseOptimizedPathLength <synapse path length optimized as a group>]
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (new morph with NEURON network simulator evaluation)
   -createHomomorphicNetworks
   -neuronExec <path to NEURON simulator executable>
   -simDir <directory containing model directory and simulation files>
   -simHocFile <simulation hoc file name>
   -loadNetwork <homomorph network file name>
   -populationSize <number population members>
   -numOffspring <number offspring per generation>
   [-parentLongevity <parent dies after this many offspring>]
   -numGenerations <number of evolution generations>
   -crossoverRate <probability>
   -mutationRate <probability>
   -synapseWeights <minimum> <maximum> <max delta>
   -synapseCrossoverBondStrength <probability of connected neurons crossing over together>
   -synapseOptimizedPathLength <synapse path length optimized as a group>
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-randomSeed <random seed>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (resume morph with NEURON simulator evaluation)
   -createHomomorphicNetworks
   -neuronExec <path to NEURON simulator executable>
   -simDir <directory containing model directory and simulation files>
   -simHocFile <simulation hoc file name>
   -loadMorph <morph file name>
   -numGenerations <number of evolution generations>
   [-crossoverRate <probability> (defaults to loaded value)]
   [-mutationRate <probability> (defaults to loaded value)]
   [-synapseCrossoverBondStrength <probability of connected neurons crossing over together>]
   [-synapseOptimizedPathLength <synapse path length optimized as a group>]
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (new morph with c302 simulator evaluation)
   -createHomomorphicNetworks
   -jnmlCmd <path to jnml command>
   -simDir <path to the CElegansNeuroML directory>
   -loadNetwork <homomorph network file name>
   -populationSize <number population members>
   -numOffspring <number offspring per generation>
   [-parentLongevity <parent dies after this many offspring>]
   -numGenerations <number of evolution generations>
   -crossoverRate <probability>
   -mutationRate <probability>
   -synapseWeights <minimum> <maximum> <max delta>
   -synapseCrossoverBondStrength <probability of connected neurons crossing over together>
   -synapseOptimizedPathLength <synapse path length optimized as a group>
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-randomSeed <random seed>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (resume morph with c302 simulator evaluation)
   -createHomomorphicNetworks
   -jnmlCmd <path to jnml command>
   -simDir <path to the CElegansNeuroML directory>
   -loadMorph <morph file name>
   -numGenerations <number of evolution generations>
   [-crossoverRate <probability> (defaults to loaded value)]
   [-mutationRate <probability> (defaults to loaded value)]
   [-synapseCrossoverBondStrength <probability of connected neurons crossing over together>]
   [-synapseOptimizedPathLength <synapse path length optimized as a group>]
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]

Merge homomorphic network populations:

bionet   
   -mergeHomomorphicNetworks
   -loadMorph <morph file name> <morph file name>
   -saveMorph <morph file name>
   [-randomSeed <random seed>]

Create isomorphic networks:

bionet (new morph)   
   -createIsomorphicNetworks
   -loadBehaviors <behaviors file name>
   -populationSize <number population members>
   -numMutants <number mutants per generation>
   -numGenerations <number of evolution generations>
   [-behaveQuorum <behaving member quorum required to advance behavior testing to next sensory-motor step>
      (defaults to immediate testing of entire behavior sequences)
	  [<maximum generations before advancing without a quorum>]]
   -excitatoryNeurons <minimum number> <maximum> <max delta> <probability of random change>
   -inhibitoryNeurons <minimum number> <maximum> <max delta> <probability of random change>
   -synapsePropensities <minimum> <maximum> <max delta> <probability of random change>
   -synapseWeights <minimum> <maximum> <max delta> <probability of random change>
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-randomSeed <random seed>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]
bionet (resume morph)
   -createIsomorphicNetworks
   -loadBehaviors <behaviors file name>
   -loadMorph <morph file name>
   -numGenerations <number of evolution generations>
   -saveMorph <morph file name> and/or -saveNetworks [<files prefix (default="network_")>]
   [-logMorph <morph log file name> (instead of standard output)]
   [-numThreads <number of threads> (defaults to system capacity)]

bionet's People

Contributors

portegys avatar msasinski avatar

Watchers

James Cloos avatar Matthew Springett avatar

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.