{"id":18420656,"url":"https://github.com/openworm/bionet","last_synced_at":"2026-03-07T11:02:44.886Z","repository":{"id":10493169,"uuid":"12674829","full_name":"openworm/bionet","owner":"openworm","description":"Artificial biological neural network","archived":false,"fork":false,"pushed_at":"2015-04-26T02:16:56.000Z","size":28330,"stargazers_count":31,"open_issues_count":0,"forks_count":10,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-22T19:43:19.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://tom.portegys.com/research.html#celegans","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openworm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-08T02:18:32.000Z","updated_at":"2024-06-21T09:42:19.000Z","dependencies_parsed_at":"2022-09-03T01:51:44.991Z","dependency_job_id":null,"html_url":"https://github.com/openworm/bionet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2Fbionet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2Fbionet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2Fbionet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2Fbionet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openworm","download_url":"https://codeload.github.com/openworm/bionet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661914,"owners_count":20975146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:22:36.050Z","updated_at":"2026-03-07T11:02:39.867Z","avatar_url":"https://github.com/openworm.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bionet\n======\n\n#Artificial biological neural network\n\nBionet simulates a biologically inspired neural network composed of\nsensory neurons, interneurons, and motor neurons which can be connected\nin arbitrary configurations. Signals propagate through the network one\nsynapse at a time. A network behavior is defined as a sequence of\nsensory-motor neuron firings.\n\nBionet also possesses a network morphogenesis capability:\nAn isomorphic network reproduces the behaviors of another network\nwithout knowing its interneuron configuration. A homomorphic network\nadditionally mirrors the interneuron configuration of the other network.\n\nBionet was inspired by OpenWorm (openworm.org), a project to model the\nC. elegans nematode worm in a high fidelity artificial creature. Although\nthe connectome (neural network) of the worm is known, it is not known\nhow it produces sensory-motor behaviors. Bionet is an attempt to do this.\nA network containing the C. elegans connectome is supplied with\nthe distribution: CElegans_network.txt. This network has random weights\nand can be used to produce sensory-motor behavior sequences. The goal\nis to evolve other networks that perform the same behaviors, not\nknowing the original network weights. Since C. elegans has more than\n3000 synapses, this is a daunting task. However, accomplishing it would\nbe a significant step toward programming an artificial C. elegans.\n\nIn addition to Bionet, see the CElegans/Readme.txt for related projects\nthat are specific to C. elegans.\n\n##Required packages:\n```\n1. UNIX: the gcc compiler, make command, and the bash shell.\n2. Windows: Microsoft Visual C++ 2012 (or later) IDE.\n3. Pthreads.\n```\n##Optional packages:\n```\n1. Fourier Transform undulation behavior evaluation:\n   FFTW3 Fourier Transform package: www.fftw.org\n2. NEURON simulator evaluation:\n   a. Generate and export C. elegans simulation with NeuroConstruct:\n      github.com/openworm/OpenWorm/wiki/Running-the-C.-elegans-model-in-neuroConstruct\n   b. Evaluate with NEURON simulator: www.neuron.yale.edu/neuron/\n   c. If you have to compile sim/model/mod files for a new platform, see:\n      www.neuron.yale.edu/neuron/faq#compilemod\n      For example, to compile under UNIX/Linux:\n      Run \"modlunit filename\" on each mod file, then run nrnivmodl to compile.\n3. c302 simulator evaluation:\n   a. Install python with neuroml, numpy, etc. packages. (Anaconda installs these).\n   b. Install jNeuroML using link from c302 README:\n      github.com/openworm/CElegansNeuroML/tree/master/CElegans/pythonScripts/c302 \n   c. Download CElegansNeuroML from github.com/openworm/CElegansNeuroML\n      into sim directory and unzip.\n   d. Create sim/CElegansNeuroML/CElegans/pythonScripts/c302/c302_network.txt file with format:\n\t  Cells:\n\t  \u003cneuron name\u003e\n\t  ...\n\t  Synapses:\n\t  \u003csource neuron\u003e \u003ctarget neuron\u003e \u003cweight\u003e\n\t  (Example: \"ADAL AIBL 0.5\")\n\t  ...\n\t  Stimuli:\n\t  \u003cneuron name\u003e\n\t  ...\n```\n###To build:\n```\nUNIX: \n1. 'make'\n2. For Fourier Transform undulation behavior evaluation: 'make fft_undulation_eval'\n\nWindows: use VC++ solution and project files.\n```\n###Commands:\n\n**Create network:**\n```\nbionet\n   -createNetwork\n   -numNeurons \u003cnumber of neurons\u003e\n   -numSensors \u003cnumber of sensors\u003e\n   -numMotors \u003cnumber of motors\u003e\n   [-inhibitorDensity \u003cinhibitory neuron density [0.0,1.0]\u003e]\n   [-synapsePropensity \u003csynapse generation propensity (0.0,1.0]\u003e]\n   [-minSynapseWeight \u003cminimum synapse weight (defaults to 0.0)\u003e]\n   [-maxSynapseWeight \u003cmaximum synapse weight (defaults to 1.0)\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n   [-saveNetwork \u003cnetwork file name\u003e]\n   [-graphNetwork \u003cgraph file name ('dot' format)\u003e]\n```\n**Print network:**\n```\nbionet\n   -printNetwork\n   [-connectivity (also print connectivity)]   \n   -loadNetwork \u003cnetwork file name\u003e\n```\n**Graph network:**\n```\nbionet\n   -graphNetwork \u003cgraph file name ('dot' network)\u003e\n   [-title \u003cgraph title\u003e]\n   -loadNetwork \u003cnetwork file name\u003e\n```\n**Create network behaviors:**\n```\nbionet (create random behaviors)\n   -createNetworkBehaviors\n   -loadNetwork \u003cnetwork file name\u003e\n   -behaviorLengths \u003csensory-motor sequence length list (blank separator)\u003e\n   [-saveBehaviors \u003cbehaviors file name\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n```\n\n```\nbionet (create motor outputs from given sensor inputs)\n   -createNetworkBehaviors\n   -loadNetwork \u003cnetwork file name\u003e\n   -loadSensorBehaviors \u003cbehaviors file name\u003e\n   [-saveBehaviors \u003cbehaviors file name\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n```\n\n```\nbionet (create undulation behavior movements)\n   -createNetworkBehaviors\n   -loadNetwork \u003cnetwork file name\u003e\n   -undulationMovements \u003cnumber of sinusoidal movements\u003e\n   [-saveBehaviors \u003cbehaviors file name\u003e \n      (behavior 0: with light touch stimulation; behavior 1: without stimulation)]\n   [-randomSeed \u003crandom seed\u003e]\n```\n**Test network behaviors:**\n```\nbionet\n   -testNetworkBehaviors\n   -loadNetwork \u003cnetwork file name\u003e\n   -loadBehaviors \u003cbehaviors file name\u003e\n   [-motorDeltaTolerance \u003cminimum motor delta to print\u003e]\n```\n\n**Print network behaviors:**\n\n```\nbionet\n   -printNetworkBehaviors\n   -loadBehaviors \u003cbehaviors file name\u003e\n```\n**Create homomorphic networks:**\n```\nbionet (new morph)\n   -createHomomorphicNetworks\n   -loadBehaviors \u003cbehaviors file name\u003e\n   -loadNetwork \u003chomomorph network file name\u003e\n   -populationSize \u003cnumber population members\u003e\n   -numOffspring \u003cnumber offspring per generation\u003e\n   [-parentLongevity \u003cparent dies after this many offspring\u003e]\n   -numGenerations \u003cnumber of evolution generations\u003e\n   [-behaveCutoff \u003cstop evolution when this many members behave\u003e]\n   [-behaveQuorum \u003cbehaving member quorum required to advance behavior testing to next sensory-motor step\u003e\n      (defaults to immediate testing of entire behavior sequences)\n\t  [\u003cmaximum generations before advancing without a quorum\u003e]]\n   [-fitnessMotorList \u003clist of motor outputs evaluated for fitness (0-n, comma-separated)\u003e\n      (defaults to fitness evaluation of all motor outputs)]\n   -crossoverRate \u003cprobability\u003e\n   -mutationRate \u003cprobability\u003e\n   -synapseWeights \u003cminimum\u003e \u003cmaximum\u003e \u003cmax delta\u003e\n   -synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e\n   -synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n```\nbionet (resume morph)\n   -createHomomorphicNetworks\n   -loadBehaviors \u003cbehaviors file name\u003e\n   -loadMorph \u003cmorph file name\u003e\n   -numGenerations \u003cnumber of evolution generations\u003e\n   [-behaveCutoff \u003cstop evolution when this many members behave\u003e]\n   [-fitnessMotorList \u003clist of motor outputs evaluated for fitness (0-n, comma-separated)\u003e\n      (defaults to loaded list)]\n   [-crossoverRate \u003cprobability\u003e (defaults to loaded value)]\n   [-mutationRate \u003cprobability\u003e (defaults to loaded value)]\n   [-synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e]\n   [-synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e]\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n\n```\nbionet (new undulation behavior morph)\n   -createHomomorphicNetworks\n   -undulationMovements \u003cnumber of sinusoidal movements\u003e\n   -loadNetwork \u003chomomorph network file name\u003e\n   -populationSize \u003cnumber population members\u003e\n   -numOffspring \u003cnumber offspring per generation\u003e\n   [-parentLongevity \u003cparent dies after this many offspring\u003e]\n   -numGenerations \u003cnumber of evolution generations\u003e\n   -crossoverRate \u003cprobability\u003e\n   -mutationRate \u003cprobability\u003e\n   -synapseWeights \u003cminimum\u003e \u003cmaximum\u003e \u003cmax delta\u003e\n   -synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e\n   -synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n\n```\nbionet (resume undulation behavior morph)\n   -createHomomorphicNetworks\n   -undulationMovements \u003cnumber of sinusoidal movements\u003e\n   -loadMorph \u003cmorph file name\u003e\n   -numGenerations \u003cnumber of evolution generations\u003e\n   [-crossoverRate \u003cprobability\u003e (defaults to loaded value)]\n   [-mutationRate \u003cprobability\u003e (defaults to loaded value)]\n   [-synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e]\n   [-synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e]\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n\n```\nbionet (new morph with NEURON network simulator evaluation)\n   -createHomomorphicNetworks\n   -neuronExec \u003cpath to NEURON simulator executable\u003e\n   -simDir \u003cdirectory containing model directory and simulation files\u003e\n   -simHocFile \u003csimulation hoc file name\u003e\n   -loadNetwork \u003chomomorph network file name\u003e\n   -populationSize \u003cnumber population members\u003e\n   -numOffspring \u003cnumber offspring per generation\u003e\n   [-parentLongevity \u003cparent dies after this many offspring\u003e]\n   -numGenerations \u003cnumber of evolution generations\u003e\n   -crossoverRate \u003cprobability\u003e\n   -mutationRate \u003cprobability\u003e\n   -synapseWeights \u003cminimum\u003e \u003cmaximum\u003e \u003cmax delta\u003e\n   -synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e\n   -synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n\n```\nbionet (resume morph with NEURON simulator evaluation)\n   -createHomomorphicNetworks\n   -neuronExec \u003cpath to NEURON simulator executable\u003e\n   -simDir \u003cdirectory containing model directory and simulation files\u003e\n   -simHocFile \u003csimulation hoc file name\u003e\n   -loadMorph \u003cmorph file name\u003e\n   -numGenerations \u003cnumber of evolution generations\u003e\n   [-crossoverRate \u003cprobability\u003e (defaults to loaded value)]\n   [-mutationRate \u003cprobability\u003e (defaults to loaded value)]\n   [-synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e]\n   [-synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e]\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n\n```\nbionet (new morph with c302 simulator evaluation)\n   -createHomomorphicNetworks\n   -jnmlCmd \u003cpath to jnml command\u003e\n   -simDir \u003cpath to the CElegansNeuroML directory\u003e\n   -loadNetwork \u003chomomorph network file name\u003e\n   -populationSize \u003cnumber population members\u003e\n   -numOffspring \u003cnumber offspring per generation\u003e\n   [-parentLongevity \u003cparent dies after this many offspring\u003e]\n   -numGenerations \u003cnumber of evolution generations\u003e\n   -crossoverRate \u003cprobability\u003e\n   -mutationRate \u003cprobability\u003e\n   -synapseWeights \u003cminimum\u003e \u003cmaximum\u003e \u003cmax delta\u003e\n   -synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e\n   -synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n\n```\nbionet (resume morph with c302 simulator evaluation)\n   -createHomomorphicNetworks\n   -jnmlCmd \u003cpath to jnml command\u003e\n   -simDir \u003cpath to the CElegansNeuroML directory\u003e\n   -loadMorph \u003cmorph file name\u003e\n   -numGenerations \u003cnumber of evolution generations\u003e\n   [-crossoverRate \u003cprobability\u003e (defaults to loaded value)]\n   [-mutationRate \u003cprobability\u003e (defaults to loaded value)]\n   [-synapseCrossoverBondStrength \u003cprobability of connected neurons crossing over together\u003e]\n   [-synapseOptimizedPathLength \u003csynapse path length optimized as a group\u003e]\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n**Merge homomorphic network populations:**\n```\nbionet   \n   -mergeHomomorphicNetworks\n   -loadMorph \u003cmorph file name\u003e \u003cmorph file name\u003e\n   -saveMorph \u003cmorph file name\u003e\n   [-randomSeed \u003crandom seed\u003e]\n```\n**Create isomorphic networks:**\n```\nbionet (new morph)   \n   -createIsomorphicNetworks\n   -loadBehaviors \u003cbehaviors file name\u003e\n   -populationSize \u003cnumber population members\u003e\n   -numMutants \u003cnumber mutants per generation\u003e\n   -numGenerations \u003cnumber of evolution generations\u003e\n   [-behaveQuorum \u003cbehaving member quorum required to advance behavior testing to next sensory-motor step\u003e\n      (defaults to immediate testing of entire behavior sequences)\n\t  [\u003cmaximum generations before advancing without a quorum\u003e]]\n   -excitatoryNeurons \u003cminimum number\u003e \u003cmaximum\u003e \u003cmax delta\u003e \u003cprobability of random change\u003e\n   -inhibitoryNeurons \u003cminimum number\u003e \u003cmaximum\u003e \u003cmax delta\u003e \u003cprobability of random change\u003e\n   -synapsePropensities \u003cminimum\u003e \u003cmaximum\u003e \u003cmax delta\u003e \u003cprobability of random change\u003e\n   -synapseWeights \u003cminimum\u003e \u003cmaximum\u003e \u003cmax delta\u003e \u003cprobability of random change\u003e\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-randomSeed \u003crandom seed\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n```\nbionet (resume morph)\n   -createIsomorphicNetworks\n   -loadBehaviors \u003cbehaviors file name\u003e\n   -loadMorph \u003cmorph file name\u003e\n   -numGenerations \u003cnumber of evolution generations\u003e\n   -saveMorph \u003cmorph file name\u003e and/or -saveNetworks [\u003cfiles prefix (default=\"network_\")\u003e]\n   [-logMorph \u003cmorph log file name\u003e (instead of standard output)]\n   [-numThreads \u003cnumber of threads\u003e (defaults to system capacity)]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenworm%2Fbionet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenworm%2Fbionet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenworm%2Fbionet/lists"}