Problem Set 2 (21.4 - 5.5.08, extended to 19.5.08)
In this exercise we want to explore the neural field model from the lecture. Instead of calculating solutions analytically we will write a numerical simulation and visualize the solutions.
- The main part of the program should be a neural field simulator for a discretized rectangular 2d area (e.g. 100 times 100 "pixels"). Ideally the dimensions should just be another parameter (also allowing for example 1d simulations), but this is not required. The shape of the kernel and the sigmoidal should be changeable. Given an initial pattern one should then be able to simulate a given number of time steps.
- Another part of the program should visualize the 2d neural field states in some kind of animation. You can either use the (somewhat limited) animation abilities of matplotlib or you can save the individual images and present them via an HTML page (e.g. using this python module for slideshows in HTML pages).
- Write unit tests for your simulator (see e.g. software carpentry). If you discretize the kernel and the sigmoidal you can check that this works correctly. Additionally you could check the simulation outcome for a very simple test case. At least you should check that the simulation runs without any exception. The unit tests should be provided in a separate module.
- Implement the following test scenarios, which are the scenarios from the analytical problem sheet:
- Simulate a standard scenario with local excitation & global inhibition, where a random starting pattern leads to a single blob of activity.
- Alter the previous scenario by limiting the range of the inhibition. Demonstrate that multiple active blobs emerge.
- Use an asymmetric kernel to get a single moving blob.
- Implement time delayed inhibition as described in exercise 2.4 on the analytical problem sheet. Try to implement this in an elegant way based on your simulation class. Try to avoid any code duplication (e.g. derive a subclass that overwrites some kind of template method, refactor the original simulation class in a sensible way to make this possible).
The code for running the first three scenarios should be as decoupled from the actual simulation code as possible.