negmas.ga¶
Implements GA-based negotiation mechanisms
- class negmas.ga.GAMechanism(initial_state: GAState | None = None, *args, n_population: int = 100, mutate_rate: float = 0.1, **kwargs)[source]¶
Bases:
Mechanism[NegotiatorMechanismInterface,GAState,MechanismAction,SorterNegotiator]Naive GA-based mechanism that assume multi-issue discrete domains.
- Parameters:
*args – positional arguments to be passed to the base Mechanism
**kwargs – keyword arguments to be passed to the base Mechanism
n_population – The number of outcomes for each generation
mutate_rate – The rate of mutation
- class negmas.ga.GAState(running: bool = False, waiting: bool = False, started: bool = False, step: int = 0, time: float = 0.0, relative_time: float = 0.0, broken: bool = False, timedout: bool = False, agreement: Outcome | None = None, results: Outcome | OutcomeSpace | tuple[Outcome] | None = None, n_negotiators: int = 0, has_error: bool = False, error_details: str = '', erred_negotiator: str = '', erred_agent: str = '', dominant_outcomes: list[Outcome] = NOTHING)[source]¶
Bases:
MechanismStateDefines extra values to keep in the mechanism state. This is accessible to all negotiators