Giter Club home page Giter Club logo

gopigo_openwormbrain's Introduction

GoPiGo C. elegans Connectome Code

The GoPiGoConnectomev(n).py Python program provided here can be used with a Raspberry Pi GoPiGo robotic kit created by Dexter Industries.

To run this code, from the Pi directory, type

sudo python connectome.py

The tiny worm Caenorhabditis elegans has only 302 neurons but exhibits some complex behaviors. When the worm senses food through a variety of sensory neurons, the worm will move forward towards that food source. When the worm’s nose senses a blocking object, the worm will stop, backup and change direction to move around the object or avoid it all together. After successfully simulating the worm’s brain in a more complex environment, I wanted to see if a similar application could be created in a much simpler environment and the GoPiGo with a Raspberry Pi was the perfect answer.

Combining Worm and GoPiGo Robot

I created the connectome of the worm in a Python 2.7 program utilizing the GoPiGo commands for sensory input and motor output. The program essentially does the following:

  • If no other sensory input is happening, stimulate food sensing neurons
  • If an object is within 25cm of the sonar sensor, stimulate nose touch sensory neurons
  • Each stimulation of sensory neurons, runs the connectome whereby each sensory neuron has added weights within a dictionary of the entire worms neural structure (i.e. dendriteAccumulate function). After each sensory neuron is activated and weights added, the programs run through all the neurons (i.e. runnconnectome function) and anywhere the accumulated weights of a neuron is greater than a predefined threshold, the neuron fires (i.e. fireNeuron function) and additional weights are added throughout the connectome which include neurons and muscles.
  • Each time the Connectome is ran, muscles, which are part of the same dictionary as the neurons, are accumulated as Right and Left muscle weights (weights for muscles can be negative as well as positive) and the wheels on the robot are activated according to the weighted values.
  • Each time a neuron or muscle is activated, the weights are set to zero so that accumulation can start again.

Worm’s Brain Controls the GoPiGo Robot

To be clear, there is no programming that is directing the robot to stop or rotate a wheel in one direction or another. It is only the collective weighted values being generated from the simulated worm connectome that guides the actions of the robot. It was very difficult to contain the connectome into a single application and make it run on a Raspberry Pi but this is a good attempt from the evidence I have seen. This is truly a totally autonomous robot that is reacting to its environment through a simulated brain of a nematode.

I encourage others to use the connectome program and try to change the methods to make the program run more efficiently and react better to the environment. However, I do not encourage any changes to the connectomic structure of the program itself if you are interested in studying the nervous system of the C elegans nematode. Changes to the connectome, means you are creating your own simulated nervous system and away from the worms nervous system, which might be fun to explore as well.

gopigo_openwormbrain's People

Contributors

ggaabe avatar msasinski avatar alexanderankin avatar interintel avatar mattbaker avatar ourkix 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.