GeniusNegotiator

class negmas.genius.GeniusNegotiator(assume_normalized=True, ufun: Optional[negmas.utilities.UtilityFunction] = None, name: str = None, rational_proposal=False, parent: negmas.negotiators.Controller = None, owner: Agent = None, java_class_name: str = None, domain_file_name: Union[str, pathlib.Path] = None, utility_file_name: Union[str, pathlib.Path] = None, keep_issue_names: bool = True, keep_value_names: bool = True, can_propose=True, normalize_utility: bool = False, normalize_max_only: bool = False, auto_load_java: bool = True, port: int = 25337, genius_bridge_path: str = None)[source]

Bases: negmas.sao.SAONegotiator

Encapsulates a Genius Negotiator

Attributes Summary

is_connected

java_name

port

Methods Summary

cancel([reason])

A method that may be called by a mechanism to make the negotiator cancel whatever it is currently processing.

counter(state, offer)

Called by the mechanism to counter the offer.

destroy_java_counterpart([state])

join(ami, state, *[, ufun, role])

Called by the mechanism when the agent is about to enter a negotiation.

negotiators([agent_based, party_based])

Returns a list of all available agents in genius 8.4.0

on_negotiation_end(state)

called when a negotiation is ended

on_negotiation_start(state)

Called when the info starts.

parse(action)

Parses an action into a ResponseType and an Outcome (if one is included) :param action:

propose(state)

Propose an offer or None to refuse.

random_negotiator([agent_based, …])

Returns an agent with a random class name

random_negotiator_name([agent_based, …])

robust_negotiators()

Returns a list of genius agents that were tested and seem to be robustly working with negmas

test()

Attributes Documentation

is_connected
java_name
port

Methods Documentation

cancel(reason=None)None[source]

A method that may be called by a mechanism to make the negotiator cancel whatever it is currently processing.

Negotiators can just ignore this message (default behavior) but if there is a way to actually cancel work, it should be implemented here to improve the responsiveness of the negotiator.

counter(state: negmas.common.MechanismState, offer: Optional[Outcome])[source]

Called by the mechanism to counter the offer. It just calls respond_ and propose_ as needed.

Parameters
  • stateMechanismState giving current state of the negotiation.

  • offer – The offer to be countered. None means no offer and the agent is requested to propose an offer

Returns

The response to the given offer with a counter offer if the response is REJECT

Return type

Tuple[ResponseType, Outcome]

destroy_java_counterpart(state=None)None[source]
join(ami: negmas.common.AgentMechanismInterface, state: negmas.common.MechanismState, *, ufun: Optional[negmas.utilities.UtilityFunction] = None, role: str = 'agent')bool[source]

Called by the mechanism when the agent is about to enter a negotiation. It can prevent the agent from entering

Parameters
Returns

bool indicating whether or not the agent accepts to enter. If False is returned it will not enter the negotiation

classmethod negotiators(agent_based=True, party_based=True)List[str][source]

Returns a list of all available agents in genius 8.4.0

Parameters
  • agent_based – Old agents based on the Java class Negotiator

  • party_based – Newer agents based on the Java class AbstractNegotiationParty

Returns:

on_negotiation_end(state: negmas.common.MechanismState)None[source]

called when a negotiation is ended

on_negotiation_start(state: negmas.common.MechanismState)None[source]

Called when the info starts. Connects to the JVM.

parse(action: str)Tuple[Optional[negmas.outcomes.ResponseType], Optional[Outcome]][source]

Parses an action into a ResponseType and an Outcome (if one is included) :param action:

Returns:

propose(state)[source]

Propose an offer or None to refuse.

Parameters

stateMechanismState giving current state of the negotiation.

Returns

The outcome being proposed or None to refuse to propose

Remarks:
  • This function guarantees that no agents can propose something with a utility value

classmethod random_negotiator(agent_based=True, party_based=True, port: int = 25337, domain_file_name: Optional[str] = None, utility_file_name: Optional[str] = None, keep_issue_names: bool = True, keep_value_names: bool = True, auto_load_java: bool = False, can_propose=True, name: Optional[str] = None)negmas.genius.GeniusNegotiator[source]

Returns an agent with a random class name

Parameters
  • name – negotiator name

  • can_propose – Can this negotiator propose?

  • auto_load_java – load the JVM if needed

  • keep_value_names – Keep value names if values are strings

  • keep_issue_names – Use dictionaries instead of tuples for representing outcomes

  • utility_file_name – Name of the utility xml file

  • domain_file_name – Name of the domain XML file

  • port – port number to use if the JVM is to be started

  • agent_based – Old agents based on the Java class Negotiator

  • party_based – Newer agents based on the Java class AbstractNegotiationParty

Returns

GeniusNegotiator an agent with a random java class

classmethod random_negotiator_name(agent_based=True, party_based=True)[source]
classmethod robust_negotiators()List[str][source]

Returns a list of genius agents that were tested and seem to be robustly working with negmas

test()str[source]