return self.correct_response
    def origin_constant(self):
        return [.93]
    def reset(self, randomize=False):
        self.choose_time = 0.0
        nef.SimpleNode.reset(self, randomize)

net.add(TrainingInput('SNinput'))

action_vals = [[2]]
net.make_input('default_competitor', value=[1.5]) # value found from trial and error

# Cortical actions and ILP
#===================
for d in range(d1): 
    cortical_action.make(net=net, name='action %d'%d, 
        neurons=N1, dimensions=d2, action_vals=action_vals[d])) 
    # create modulating ILP populations
    net.make('ILP %d'%d, neurons=10*N1, dimensions=1) 
# population representing the input to the system
net.make('input', neurons=N1, dimensions=d3) 
net.make('bg_input', neurons=10*N1, dimensions=d1)
# +1 for default_competitor 
net.make('bg_input_for_real', neurons=d1*N1, dimensions=d1+1) 
# where all the cortical action output is summed
net.make('actual', neurons=N1, dimensions=d2) 

# Create networks for dot product and weighted summation
# relay population (for preserving dot1 output)
net.make(name='ILP multiplexer', neurons=2*d1*N1, dimensions=d1+1) 
# between error and primitives
net.add(make_dot(name='error_projection', neurons=N1, dimensions1=d1, dimensions2=d3)) 
Exemplo n.º 2
0
            # update the time to next change the input again
            self.choose_time = self.t + self.period_length
        return [self.input_vals[self.index]]
    def origin_goal(self):
        return self.correct_response
    def reset(self, randomize=False):
        self.choose_time = 0.0
        nef.SimpleNode.reset(self, randomize)
net.add(TrainingInput('SNinput'))

# Cortical populations 
#===================
# input to the system
net.make('input', neurons=N1, dimensions=d3) 
for d in range(d1):
    cortical_action.make(net=net, name='action%d'%d, 
        neurons=N2, dimensions=d2, action_vals=[1], mode='direct') 
    # create modulating ILP populations
    net.make('ILP %d'%d, neurons=2*N1, dimensions=1) 

net.connect('SNinput:ILinput', 
            'input')

# Explorer
#==================
net.make('explorer', neurons=neurons_explorer, dimensions=1)

# Actor
#==================
net.make('actor', neurons=N1, dimensions=1)#, radius=.5)
net.make(name='learn_signal_actor', neurons=N1, dimensions=1)
    #, noise=10)
Exemplo n.º 3
0
    def reset(self, randomize=False):
        self.choose_time = 0.0
        nef.SimpleNode.reset(self, randomize)


net.add(TrainingInput('SNinput'))

# Cortical populations
#===================
# input to the system
net.make('input', neurons=N1, dimensions=d3)
for d in range(d1):
    cortical_action.make(net=net,
                         name='action%d' % d,
                         neurons=N2,
                         dimensions=d2,
                         action_vals=[1],
                         mode='direct')
    # create modulating ILP populations
    net.make('ILP %d' % d, neurons=2 * N1, dimensions=1)

net.connect('SNinput:ILinput', 'input')

# Explorer
#==================
net.make('explorer', neurons=neurons_explorer, dimensions=1)

# Actor
#==================
net.make('actor', neurons=N1, dimensions=1)  #, radius=.5)
net.make(name='learn_signal_actor', neurons=N1, dimensions=1)