An AGTControlMechanism is a ControlMechanism that uses an ObjectiveMechanism with a DualAdaptiveIntegrator Function to regulate its control_allocation. When used with an LCControlMechanism to regulate the mode parameter of its FitzHughNagumoIntegrator Function, it implements a form of the Adaptive Gain Theory of the locus coeruleus-norepinephrine (LC-NE) system.

Creating an AGTControlMechanism

An AGTControlMechanism can be created in any of the ways used to create a ControlMechanism.

Like all ControlMechanisms, an AGTControlMechanism it receives its input from an ObjectiveMechanism. However, unlike standard ControlMechanism, an AGTControlMechanism does not have an objective_mechanism argument in its constructor. When an AGTControlMechanism is created, it automatically creates an ObjectiveMechanism and assigns a DualAdaptiveIntegrator Function as its function.

The OutputStates to be monitored by the AGTControlMechanism’s objective_mechanism are specified using the monitored_output_states argument of the AGTControlMechanism’s constructor, using any of the ways to specify the OutputStates monitored by ObjectiveMechanism. The monitored OutputStates are listed in the LCControlMechanism’s monitored_output_states attribute, as well as that of its objective_mechanism.

The parameter(s) controlled by an AGTControlMechanism are specified in the control_signals argument of its constructor, in the standard way for a ControlMechanism.


Input: ObjectiveMechanism and Monitored OutputStates

An AGTControlMechanism has a single (primary) InputState that receives its input via a MappingProjection from the OUTCOME OutputState of an ObjectiveMechanism. The ObjectiveMechanism is created automatically when the AGTControlMechanism is created, using a DualAdaptiveIntegrator as its function, and is listed in the AGTControlMechanism’s objective_mechanism attribute. The ObjectiveMechanism aggregates the values of the OutputStates that it monitors, integrates their aggregated value at two different rates, and combines those to generate the its output, which is used by the AGTControlMechanism as its input. The OutputStates monitored by the ObjectiveMechanism, listed in its monitored_output_states attribute, are also listed in the AGTControlMechanism’s monitored_output_states attribute. They can be displayed using the AGTControlMechanism’s show method.


An AGTControlMechanism uses the default function for a Control Mechanisms (a default Linear Function), that simply passes its input to its output. Thus, it is the output of the AGTControlMechanism’s objective_mechanism that determines its control_allocation and the allocation of its ControlSignal(s).


An AGTControlMechanism has a ControlSignal for each parameter specified in its control_signals attribute, that sends a ControlProjection to the ParameterState for the corresponding parameter. ControlSignals are a type of OutputState, and so they are also listed in the AGTControlMechanism’s output_states attribute. The parameters modulated by an AGTControlMechanism’s ControlSignals can be displayed using its show method. By default, all of its ControlSignals are assigned the result of the AGTControlMechanism’s function, which is the input it receives from its objective_mechanism. above). The allocation is used by the ControlSignal(s) to determine their intensity, which is then assigned as the value of the ControlSignal’s ControlProjection. The value of the ControlProjection is used by the ParameterState to which it projects to modify the value of the parameter it controls (see Modulation for description of how a ControlSignal modulates the value of a parameter).


An AGTControlMechanism’s function takes as its input the value of its OUTCOME input_state, and uses that to determine its control_allocation which specifies the value assigned to the allocation of each of its ControlSignals. An AGTControlMechanism assigns the same value (the input it receives from its objective_mechanism to all of its ControlSignals. Each ControlSignal uses that value to calculate its intensity, which is used by its ControlProjection(s) to modulate the value of the ParameterState(s) for the parameter(s) it controls, which are then used in the subsequent TRIAL of execution.


A ParameterState that receives a ControlProjection does not update its value until its owner Mechanism executes (see Lazy Evaluation for an explanation of “lazy” updating). This means that even if a ControlMechanism has executed, a parameter that it controls will not assume its new value until the Mechanism to which it belongs has executed.

Class Reference

class psyneulink.library.components.mechanisms.adaptive.control.agt.agtcontrolmechanism.AGTControlMechanism(system=None, monitored_output_states=None, function=Linear, control_signals=None, params=None, name=None, prefs=None)

Subclass of ControlMechanism that modulates the multiplicative_param of the function of one or more Mechanisms.

  • system (System : default None) – specifies the System for which the AGTControlMechanism should serve as a controller; the AGTControlMechanism will inherit any OutputStates specified in the monitor_for_control argument of the system’s constructor, and any ControlSignals specified in its control_signals argument.
  • monitored_output_states (List[OutputState, Mechanisms, str, value, dict, MonitoredOutputStatesOption] or Dict) – specifies the OutputStates to be monitored by the objective_mechanism (see monitored_output_states for details of specification).
  • function (TransferFunction : default Linear(slope=1, intercept=0)) – specifies the Function used to convert the AGTControlMechanism’s input into its control_allocation, that is used to assign the allocation of its ControlSignal(s).
  • control_signals (List[ParameterState, tuple[str, Mechanism] or dict]) – specifies the parameters to be controlled by the AGTControlMechanism; a ControlSignal is created for each (see Specifying ControlSignals for details of specification).
  • params (Dict[param keyword: param value] : default None) – a parameter dictionary that can be used to specify the parameters for the Mechanism, parameters for its function, and/or a custom function and its parameters. Values specified for parameters in the dictionary override any assigned to those parameters in arguments of the constructor.
  • name (str : default see name) – specifies the name of the AGTControlMechanism.
  • prefs (PreferenceSet or specification dict : default Mechanism.classPreferences) – specifies the PreferenceSet for the AGTControlMechanism; see prefs for details.

System_Base – the System for which AGTControlMechanism is the controller; the AGTControlMechanism inherits any OutputStates specified in the monitor_for_control argument of the system’s constructor, and any ControlSignals specified in its control_signals argument.


ObjectiveMechanismObjectiveMechanism that monitors and evaluates the values specified in the ControlMechanism’s objective_mechanism argument, the output of which is used as input to the AGTControlMechanism. It is created automatically when AGTControlMechanism is created, and uses as a DualAdaptiveIntegrator as is function.


List[OutputState] – each item is an OutputState monitored by the objective_mechanism; it is the same as the ObjectiveMechanism’s monitored_output_states attribute. The value of the OutputStates listed are used by the ObjectiveMechanism to generate the AGTControlMechanism’s input.


List[Tuple(float, float)] – each tuple in the list contains the weight and exponent associated with a corresponding item of monitored_output_states; these are the same as those in the monitored_output_states_weights_and_exponents attribute of the objective_mechanism, and are used by the ObjectiveMechanism’s function to parametrize the contribution made to its output by each of the values that it monitors (see ObjectiveMechanism Function).


TransferFunction : default Linear(slope=1, intercept=0) – determines the Function used to convert the AGTControlMechanism’s input into its control_allocation, that is used to assign the allocation for its ControlSignal(s).


2d np.array – contains the value(s) assigned as the allocation for the ControlSignal(s) listed in the control_signals attribute; if the default function is used, it contains a single value that is assigned as the allocation for all of the AGTControlMechanism’s control_signals. The AGTControlMechanism’s control_allocation is the same as its value attribute).


List[ControlSignal] – list of the AGTControlMechanism’s ControlSignals , including any inherited from a system for which it is a controller (same as ControlMechanism’s output_states attribute); each sends a ControlProjection to the ParameterState for the parameter it controls


List[ControlProjection] – list of ControlProjections, one for each ControlSignal in control_signals.


ModulationParam – the default form of modulation used by the ControlMechanism’s ControlSignals, unless they are individually specified.


str – the name of the AGTControlMechanism; if it is not specified in the name argument of the constructor, a default is assigned by MechanismRegistry (see Naming for conventions used for default and duplicate names).


PreferenceSet or specification dict – the PreferenceSet for the AGTControlMechanism; if it is not specified in the prefs argument of the constructor, a default is assigned using classPreferences defined in (see PreferenceSet for details).


Display the OutputStates monitored by the AGTControlMechanism’s objective_mechanism and the multiplicative_params modulated by the AGTControlMechanism.