#FORMAT python
from pyrobot.brain.conx import *
 
n = SRN()
n.addSRNLayers(3,2,3)         # input of 3, hidden/context of 2, output of 3
n.setPatterns({"A":[1, 0, 0], # symbols we will use during training
               "B":[0, 1, 0],
               "C":[0, 0, 1]})
n.setInputs([['A','B','C'],   # sequences will be presented in random order
             ['A','C','B']])
n.predict('input','output')   # task is to predict next input
n.setReportRate(100)
n.setEpsilon(0.1)
n.setMomentum(0)
n.setTolerance(0.2)
n.setStopPercent(0.75)        # not all inputs are predictable
n.setResetEpoch(8000)
n.setResetLimit(0)
n.setSequenceType("random-segmented")
n.train()

n.setLearning(0)
n.setInteractive(1)
n.sweep()

