Selector¶
Full Name
neuroptimiser.core.processes.Selector
Description
- class Selector[source]¶
Bases:
AbstractProcess
Selector Process
This process is designed to select the best position and fitness from the spiking core’s current and new candidate based on a given function.
- Inports¶
- x_inInPort
Input port for the position variable.
- Variables¶
- pVar
Variable for the position of the agent.
- fpVar
Variable for the fitness of the agent.
- Outports¶
- p_outOutPort
Output port for the position variable.
- fp_outOutPort
Output port for the fitness variable.
See also
neuroptimiser.core.models.PySelectorModel
Model implementation of the Selector process.
- __init__(agent_id: int = 0, num_agents: int = 1, num_dimensions: int = 2, function=None, **kwargs)[source]¶
Initialise the Selector with the given parameters.
- Parameters:
agent_id (int, optional) – ID of the agent for which the selector is being created. Default is 0.
num_agents (int, optional) – Number of agents in the system. Default is 1.
num_dimensions (int, optional) – Number of dimensions for the position and fitness variables. Default is 2.
function (callable, optional) – Function to be used for evaluating the fitness of the positions. Default is None, which means no function is applied but an error will be raised if not provided.
- Keyword Arguments:
**kwargs (dict, optional) – Additional keyword arguments to be passed to the parent class AbstractProcess.