Giter Site home page Giter Site logo

r-stefano / grid-cells Goto Github PK

View Code? Open in Web Editor NEW
32.0 1.0 7.0 188.62 MB

Implementation of Vector Based Navigation using Grid-like cells using Tensorflow and Numpy

Home Page: http://www.stefanorosa.me/topicboard/artificialIntelligence/spatialNavigation

Python 100.00%
grid-cells trajectories paper deepmind tensorflow navigation neurons grid-cell brain artificial-agents

grid-cells's Introduction

Vector-based Navigation using Grid-like Representations in Artificial Agents

About

Replicating Google Deepmind's paper "Vector-based Navigation using Grid-like Representations in Artificial Agents".

It has been a long day, you are really tired and you just arrived home. You open the door and you don't have to turn on the lights but you can successfully reach the bed and felt asleep. How it has been possible?

You were tired and you didn't even see where you were going. Despite this, you moved through a familiar environment easily.

Mainly, this achievement has been possible due to the work done in the Hippocampus and in the Entorhinal cortex. In fact, it is believed that particular neurons in these regions of the brain allow us to self-localize and to navigate through environments. In these regions of the brain there are neurons that fire depending on where we are: Place cells and others that fire based on which direction we are facing: Head-direction Cells..

What are Grid cells? Full article about the paper here

Dependencies

  • Tensorflow
  • Numpy
  • Matplotlib

Network

Getting started

ratSimulator.py contains the code used to generate the trajectories. The simulator is based on this paper.

dataGenerator.py is used to create the Place Cell Distributions and Head Cell Distributions

agent.py contains the architecture of the network in Tensorflow.

In order to start the training, main.py must be called.

	python3 main.py train

This command will load the trajectoriesDataTesting.pickle if already exist. Othwerwise, it is going to create 10 trajectories to use for testing the network accuracy.

Successivelly, the program generates 500 trajectories of 800 timesteps each. They are fed into the network at batches of 10 trajectories at the time. After 50 training steps, all the 500 trajectories have been fed, so new 500 trajectories are generated.

	python3 main.py showcells

It will use the trained agent to generate 5000 trajectories of 800 timsteps each and show the linear layer activity maps for each neuron as well as the auto-correlations

Result

The agent has been able to self-localize itself with a mean error of 12cm. network Image Unfortunately, I have not been able to reproduce the same results. In fact, in the Linear layer there isn't the emerging of grid-like representations and their correlation map doesn't show hexagonal periodicity. network Image

Sources

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.