3 state Neuronal Network

Each of N elements has K inputs and 0..N-1 outputs. Initial values and inputs are assigned randomly. Element has 3 possible states: 1, 0 and -1(inhibited). At every time step "average input" [math]|in|=\frac{1}{K}\sum_{all \ inputs}^{}{input}[/math] is calculated. New value of element calculates depending on [i]previous state[/i] and lim1,2 parameters: __________[b]|in| < lim1[/b]_____________[b]lim1 <= |in|<= lim2[/b]__________________[b]|in|>lim2[/b] [b]<prev> [/b] -1.........................0...........................................0.............................................................0 0..........................0...........................................1...........................................................-1 1..........................1...........................................0.......................................................... -1

Net with N elements has [math]2^N[/math] distinct states. So any state sooner or later will be repeated, forming a loop with length L. But if L ~ [math]2^N[/math], timeline looks like set of random points - it is [i]determenistic chaos[/i]; Also we can discover[i] flip-flop loops[/i] with L ~ 1..5 and [i]long-period patterns[/i]. Loop with L=1 is stable and in this case animation stops. Try to find out, how these kinds of behavior depend of parameters lim1, lim2 and K!