#FORMAT python # import all the conx API from pyrobot.brain.conx import * # create the network n = Network() # add layers in the order they will be connected n.addLayer('input',2) # The input layer has two nodes n.addLayer('output',1) # The output layer has one node n.connect('input','output') # The input layer is connected to the output layer # provide training patterns (inputs and outputs) n.setInputs([[0.0,0.0],[0.0,1.0],[1.0,0.0],[1.0,1.0]]) n.setOutputs([[0.0],[0.0],[0.0],[1.0]]) # set learning parameters n.setEpsilon(0.5) n.setTolerance(0.2) n.setReportRate(1) # learn n.train()