GAState

class negmas.ga.GAState(running=False, waiting=False, started=False, step=0, time=0.0, relative_time=0.0, broken=False, timedout=False, agreement=None, results=None, n_negotiators=0, has_error=False, error_details='', dominant_outcomes=None)[source]

Bases: negmas.common.MechanismState

Defines extra values to keep in the mechanism state. This is accessible to all negotiators

Attributes Summary

agreement

Agreement at the end of the negotiation (it is always None until an agreement is reached).

broken

True if the negotiation has started and ended with an END_NEGOTIATION

dominant_outcomes

ended

error_details

Details of the error if any

has_error

Does the mechanism have any errors

n_negotiators

Number of agents currently in the negotiation.

relative_time

A number in the period [0, 1] giving the relative time of the negotiation.

results

In its simplest form, an agreement is a single outcome (or None for failure).

running

Whether the negotiation has started and did not yet finish

started

Whether the negotiation has started

step

The current round of the negotiation

time

The current real time of the negotiation.

timedout

True if the negotiation was timedout

waiting

Whether the negotiation is waiting for some negotiator to respond

Methods Summary

asdict()

Converts the outcome to a dict containing all fields

keys()

values()

Attributes Documentation

agreement: 'Outcome' | None = None

Agreement at the end of the negotiation (it is always None until an agreement is reached).

broken: bool = False

True if the negotiation has started and ended with an END_NEGOTIATION

dominant_outcomes: List[Optional['Outcome']] = None
ended
error_details: str = ''

Details of the error if any

has_error: bool = False

Does the mechanism have any errors

n_negotiators: int = 0

Number of agents currently in the negotiation. Notice that this may change over time if the mechanism supports dynamic entry

relative_time: float = 0.0

A number in the period [0, 1] giving the relative time of the negotiation. Relative time is calculated as max(step/n_steps, time/time_limit).

results: 'Outcome' | 'OutcomeSpace' | None = None

In its simplest form, an agreement is a single outcome (or None for failure). Nevertheless, it can be a list of outcomes or even a complete outcome space.

running: bool = False

Whether the negotiation has started and did not yet finish

started: bool = False

Whether the negotiation has started

step: int = 0

The current round of the negotiation

time: float = 0.0

The current real time of the negotiation.

timedout: bool = False

True if the negotiation was timedout

waiting: bool = False

Whether the negotiation is waiting for some negotiator to respond

Methods Documentation

asdict()

Converts the outcome to a dict containing all fields

keys()
values()