Steve, Here is the code trying to reproduce much of the LF paper simulations. There are definitely still some problems. Attached with the code is a diary that runs through me making a network. The network does complete a pattern after given 3 units on. However after another 50ms the inhibitory cells seem to stop firing and get stuck, then the whole network gets over excited. The easy way to understand what I just stated is just looking at the 2 fig files attached. I've tried some competing patterns but I think I need to tune numbers more. There are a few things I'm not sure about/ not precisely following the paper that we can address later. I'm leaving around noon Wed but I'll try to pop by. - Here's a summary of the important functions to create the code and general explanation. It's hard for me to gauge how much overhead there is for you to be able to play around with it. Sometimes I switch little things in the code like which compartment I attach synapses to which could prove to be annoying. 1. I wrote codes p_cell, mn_cell and fs_cell which are simple single cell models given the same parameters as in the paper. Here you can specify an injected current into a cell and watch the cell fire. It also produces a whole bunch of plots for all the ion channel, calcium etc. These aren't particularly well commented the network code LF_network has very detailed comments. 2. Next I create a code, p_cell_syn Here the p_cell is excited through a synapse instead. The paper giving the cell model used synapse that have current ISyn = s*G*(E_syn - V) so I change the input parameters to take in the time length the synapse is on (s), the conductance (G) and reversal potential (E_syn), and compartment the synapse attaches to. Here I can tune the parameter to try to have similar EPSP's as described in the paper on page 110. Note: I should have a code to do this to the fs_cells as well but haven't. I kinda cheated using another code. 3. I have a code pattern_maker that outputs random patterns. You specify number of cells, active cells and number of patterns. This code isn't that important as one can also make one's own patterns. 4. The biggest chunk of code is LF_network, this relies on calling two functions I'll describe first. 5. make_W is a code I got from Tony, it takes in a pattern matrix and significance vector (I set all equal). The output is the Bayesian Learning rule weight matrix. 6. I send this to my make_G code. Cells are either excitatory or inhibitory. The training patterns are created only using the excitatory cells. We end up doubling the number of cells so each "cell pairing" is an excitatory and inhibitory cell. Thus, when there are negative weights in the W matrix it creates an E to I connection, whereas a positive entry creates an E to E connections. The code takes in parameters that will control the size of the connections. These are the numbers found earlier the G term back in step 2. 7. Now LF_network can run. It is similar to p_cell_syn except it has more looping and indexing confusion. Some parameters you may want to adjust such as compartment synapse attach to have to be directly edited in the code (I did this to avoid a massive number of function input parameters). 8. The LF_network outputs the voltage matrices for the excitatory (p_cells) and inhibitory (fs_cells) cells. Enter these into the viewer.