negotiate CLI¶
The negotiate CLI provides a simple way for running negotiations, plotting them, and saving their statistics.
Installation¶
The negotiate command is automatically available after installing NegMAS:
$ pip install negmas
Basic Usage¶
Run a simple negotiation with default settings:
$ negotiate
Run with a specific scenario:
$ negotiate --scenario path/to/scenario.yml
You can find out about all the available options by running:
$ negotiate --help
Command Reference¶
negotiate¶
Available Negotiators¶
The negotiate command supports multiple types of negotiators through prefix-based selection:
Prefix |
Description |
|---|---|
(none) |
NegMAS native negotiators (e.g., |
|
Java Genius agents via JVM bridge (e.g., |
|
ANL competition agents from the |
|
BOA negotiators with custom components (e.g., |
|
MAP negotiators with custom components |
|
LLM-based negotiators from |
|
Prolog-based negotiators from |
|
Genius Agents from |
NegMAS Native Negotiators¶
These are pure Python negotiators that work out of the box without any external dependencies.
Time-Based Negotiators
These negotiators follow a time-dependent concession strategy, offering decreasing utility over time.
Negotiator |
Description |
|---|---|
|
The default time-based negotiator with configurable aspiration curve |
|
Concedes slowly (sub-linearly), making most concessions near the deadline |
|
Concedes at a constant rate throughout the negotiation |
|
Concedes quickly (super-linearly), making most concessions early |
Tit-for-Tat Negotiators
These negotiators base their concessions on the opponent’s behavior.
Negotiator |
Description |
|---|---|
|
Mirrors opponent concessions without explicit opponent modeling |
|
Alias for NaiveTitForTatNegotiator |
Other Native Negotiators
Negotiator |
Description |
|---|---|
|
Only proposes and accepts the best outcome (hardliner strategy) |
|
Proposes and accepts only top-fraction outcomes |
|
Offers randomly and accepts everything (maximally cooperative) |
|
Makes random offers with configurable acceptance probability |
|
Random offers but accepts near-optimal outcomes |
Offer-Oriented Negotiators
These negotiators consider partner offers when selecting their own offers.
Negotiator |
Description |
|---|---|
|
Considers the partner’s first offer |
|
Considers the partner’s most recent offer |
|
Considers the partner’s best offer so far |
|
Follows Pareto frontier using additive weights |
|
Follows Pareto frontier using multiplicative weights |
Python-Native Genius BOA Negotiators (G-Prefix)¶
These are Python implementations of classic Genius agents, transcompiled from the original Java code.
They use the BOA (Bidding, Opponent modeling, Acceptance) architecture and do NOT require
the Java Genius bridge. All names are prefixed with G to distinguish them from the Java versions.
Classic Time-Dependent Agents
Negotiator |
Description |
|---|---|
|
Conservative strategy (e=0.2), concedes slowly near deadline |
|
Accommodating strategy (e=2.0), concedes quickly early on |
|
Constant concession rate (e=1.0) |
|
Never concedes (e=0), always offers best outcome |
ANAC Competition Winners and Notable Agents
Negotiator |
Year |
Description |
|---|---|---|
|
2011 |
Winner. Boulware-style with frequency-based opponent modeling |
|
2010 |
Top performer. Time-dependent with combined acceptance conditions |
|
2010 |
Notable. Time-dependent with constant threshold acceptance |
|
2010 |
Competitive. Boulware-style with previous-offer acceptance |
|
2010 |
Faculty of CS agent. Conceder with constant threshold |
|
2012 |
Winner. Conservative time-dependent with frequency opponent model |
|
2012 |
Notable. Time-dependent with max-based combined acceptance |
|
2015 |
Notable. Adaptive time-dependent with window-based acceptance |
Utility Agents
Negotiator |
Description |
|---|---|
|
Random offers and accepts everything (baseline agent) |
Genius Bridge Negotiators (Java)¶
These negotiators run actual Java Genius agents through a JVM bridge. They provide access to the full library of ~200 Genius agents but require additional setup.
Setup Requirements
Before using Genius bridge negotiators, you must:
Install Java (JRE 8 or higher)
Run the Genius setup command:
$ negmas genius-setup
Start the Genius bridge (in a separate terminal or as a background process):
$ negmas genius
The bridge must be running whenever you use Genius negotiators.
Using Genius Negotiators
Genius negotiators are specified with the genius: prefix:
$ negotiate -n genius:HardHeaded -n genius:AgentK --steps 100
Some notable Genius negotiators include:
Negotiator |
Year |
Description |
|---|---|---|
|
2011 |
ANAC 2011 winner, frequency-based opponent modeling |
|
2012 |
ANAC 2012 winner, handles discount factors well |
|
2010 |
Top ANAC 2010 performer |
|
2010 |
Frequency-based opponent modeling |
|
2010 |
Boulware-style negotiation |
|
2015 |
ANAC 2015 top performer |
|
2016 |
ANAC 2016 top performer |
|
2016 |
Multi-party negotiation specialist |
For a complete list of available Genius agents, see the negmas.genius.gnegotiators module.
Note: The G-prefixed negotiators (e.g., GHardHeaded) are Python-native and do not require
the Genius bridge. They are recommended for most use cases due to better performance and simpler setup.
Note: The negotiate CLI will automatically attempt to start the Genius bridge if it is not
running when you use the genius: prefix. If the bridge cannot be started, helpful instructions
will be displayed.
External Package Negotiators¶
NegMAS supports negotiators from external packages through prefixes. These packages must be installed separately.
LLM Negotiators (negmas-llm)
Use large language models for negotiation:
$ pip install negmas-llm
$ negotiate -n llm:GPTNegotiator -n AspirationNegotiator --steps 50
Negolog Negotiators (negmas-negolog)
Use Prolog-based negotiation strategies:
$ pip install negmas-negolog
$ negotiate -n negolog:PrologNegotiator -n AspirationNegotiator --steps 50
Genius Agents (negmas-genius-agents)
Use pre-packaged Genius-style agents:
$ pip install negmas-genius-agents
$ negotiate -n ga:SomeAgent -n AspirationNegotiator --steps 50
Examples¶
Run a negotiation with 3 issues and 100 steps:
$ negotiate -i 3 -s 100
Run with specific negotiators:
$ negotiate -n AspirationNegotiator -n NaiveTitForTatNegotiator
Run with Python-native Genius agents (no bridge required):
$ negotiate -n GBoulware -n GConceder --steps 50
Run with ANAC competition winners:
$ negotiate -n GHardHeaded -n GCUHKAgent --steps 100
Run with Java Genius agents (requires bridge):
$ negmas genius & # Start bridge in background
$ negotiate -n genius:HardHeaded -n genius:AgentK --steps 100
Run without plotting:
$ negotiate --no-plot
Save results to a specific path:
$ negotiate --save-path ./results
Run with a time limit of 60 seconds:
$ negotiate -t 60