This directory contains the scripts for computer simulation 1 
(with differential reinforcement) from 

	Legenstein R, Pecevski D, Maass W 2008 A Learning Theory 
    for Reward-Modulated Spike-Timing-Dependent Plasticity with 
    Application to Biofeedback. PLoS Computational Biology 4(10): e1000180, Oct, 2008 
    
The produced result is figure 1.

To create the figure you need to:

1. The computer simulation is setup to run as an MPI application
   on 16 computing nodes on a cluster, with 2 processes per computing node.
   To set the list of the names of machines you want to use for computing
   edit the file start_simulation.py.
   
2. Start mpdboot on the cluster machines. See the mpich2 documentation on how to do this. 
   
3. Execute:

    start_simulation.py
    
    This is an executable file, you don't need to run 'python start_simulation.py'.
    
    Wait until the simulation finishes. You can monitor how the simulation progresses 
    in the sim.out file. The script will produce one hdf5 file in the current directory.

4. Then, to create figure 1 run:
   
      ipython -pylab  figure_draft_journal.py