Objets/Documentation
roles10.py
Je fournis le calcul pour « Une chaîne apprise par quatre relais identiques ».
Télécharger ↓"""Four identical copy neurons; functional probes after learning delayed coactivity."""
from fractions import Fraction as F
from itertools import product
from random import Random
import json
def observe(noise):
rng=Random(1011)
observations=[]
# An externally driven wave, with a two-tick plateau on the last unit.
for _ in range(64):
trajectory=((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1),(0,0,0,1))
trial=[tuple(b^int(rng.random()<noise) for b in x) for x in trajectory]
observations.extend(zip(trial,trial[1:]))
return observations