Negotiation Components¶
NegMAS provides modular components that can be combined to build custom negotiators. These components implement specific aspects of negotiation behavior such as acceptance strategies, offering strategies, and opponent modeling.
Overview¶
Components are the building blocks of modular negotiators. Instead of implementing a complete negotiator from scratch, you can compose negotiators from reusable components:
Acceptance Policies: Decide whether to accept, reject, or end negotiation
Offering Policies: Decide what offer to make
Opponent Models: Model the opponent’s preferences
Concession Strategies: Control how quickly to concede
Acceptance Policies¶
Acceptance policies determine how a negotiator responds to incoming offers.
Basic Acceptance Policies¶
Class |
Description |
|---|---|
|
Accepts any offer immediately |
|
Rejects all offers |
|
Ends negotiation immediately |
|
Accepts any outcome not worse than disagreement |
|
Accepts outcomes better than all previously accepted |
|
Accepts outcomes not worse than best accepted so far |
Utility-Based Acceptance¶
Class |
Description |
|---|---|
|
Accepts outcomes above a utility threshold |
|
Accepts only the best possible outcome |
|
Accepts outcomes in the top fraction or top k |
|
Accepts outcomes with utility above a constant threshold |
|
Accepts with configurable probability |
Time-Based Acceptance¶
Class |
Description |
|---|---|
|
Accepts after a relative time threshold (tau) |
|
Alias for ACTime |
|
Accepts around a specific relative time |
|
Accepts within a time range |
Offer-Based Acceptance¶
Class |
Description |
|---|---|
|
Accepts if offer is better than what we would propose next |
|
Accepts based on our last offer utility |
|
Accepts based on last k received offers |
|
Accepts based on offers in a time fraction |
|
Tit-for-tat: concedes as much as partner |
Composite Acceptance¶
Class |
Description |
|---|---|
|
Accepts only if all child strategies accept |
|
Accepts if any child strategy accepts |
|
Base class for consensus-based acceptance |
|
Uses another negotiator’s acceptance logic |
|
Accepts from a predefined outcome list |
Offering Policies¶
Offering policies determine what offers a negotiator makes.
Basic Offering Policies¶
Class |
Description |
|---|---|
|
Always offers the best outcome |
|
Offers from top fraction or top k outcomes |
|
Always offers None (no agreement) |
|
Offers random outcomes |
|
Offers from a predefined list |
Time-Based Offering¶
Class |
Description |
|---|---|
|
Offers based on aspiration curve over time |
|
Combines time-based and behavior-based strategies |
Rational Concession Offering¶
Class |
Description |
|---|---|
|
Monotonic concession - one outcome at a time |
|
Faster MiCRO that may skip outcomes |
|
Conceding Accepting Better strategy |
|
Wasting Accepting Rational strategy |
|
Tit-for-tat offering based on partner concession |
Composite Offering¶
Class |
Description |
|---|---|
|
Base for consensus-based offering |
|
Offers only if all strategies agree |
|
Randomly selects from child strategies |
|
Offers best outcome from child strategies |
|
Offers worst outcome from child strategies |
|
Uses another negotiator’s offering logic |
Genius BOA Components¶
NegMAS provides Python implementations of Genius BOA (Bidding, Opponent modeling, Acceptance) framework components. These are fully implemented in Python and do NOT require the Java Genius bridge.
Note
These components can be used standalone or combined with the Python-native
Genius negotiators (GBoulware, GHardHeaded, etc.) documented in
Available Negotiators.
Genius Acceptance Policies¶
Basic Acceptance Policies
Class |
Description |
|---|---|
|
Accept if offer ≥ next planned offer (AC_Next) |
|
Accept if utility > constant threshold |
|
Time-based acceptance (after time threshold) |
|
Accept if better than opponent’s previous offer |
|
Gap-based acceptance (utility gap analysis) |
|
Always accept (baseline) |
|
Always reject (baseline) |
Combined Acceptance Policies
Class |
Description |
|---|---|
|
Combined acceptance (AC_Next OR AC_Const) |
|
Combined with max aggregation |
|
Combined with average aggregation |
|
Combined with best average |
|
Combined acceptance variants |
|
Combined max in sliding window |
|
Probabilistic combined acceptance |
Discounted Acceptance Policies
For domains with time discounts:
Class |
Description |
|---|---|
|
Discounted constant threshold |
|
Discounted best average |
|
Discounted max in window |
|
Discounted probabilistic |
ANAC Agent-Specific Acceptance
Acceptance strategies derived from ANAC competition agents:
Class |
Description |
|---|---|
|
HardHeaded (ANAC 2011 winner) acceptance |
|
CUHKAgent (ANAC 2012 winner) acceptance |
|
AgentK series acceptance |
|
AgentLG (ANAC 2012) acceptance |
|
Nozomi (ANAC 2010) acceptance |
|
AgentSmith (ANAC 2010) acceptance |
|
TheFawkes (ANAC 2013) acceptance |
|
Gahboninho (ANAC 2011) acceptance |
|
ABMP-style acceptance |
|
Uncertainty-aware acceptance |
|
MAC acceptance strategy |
Genius Offering Policies¶
Class |
Description |
|---|---|
|
Time-dependent bidding with configurable e parameter |
|
Boulware (e=0.2): concedes slowly |
|
Conceder (e=2.0): concedes quickly |
|
Linear (e=1.0): constant concession |
|
Hardliner (e=0): never concedes |
|
Random bid selection |
|
Chooses from all possible bids |
Genius Opponent Models¶
Basic Models
Class |
Description |
|---|---|
|
Default opponent model (no modeling) |
|
Assumes uniform preferences |
|
Assumes opposite preferences to self |
|
Assumes worst-case opponent |
|
Perfect knowledge (for testing) |
Frequency-Based Models
Class |
Description |
|---|---|
|
HardHeaded frequency model (tracks unchanged issues) |
|
AgentSmith frequency model |
|
AgentX exponential smoothing model |
|
Nash-based frequency model |
|
CUHKAgent frequency model |
|
AgentLG opponent model |
Bayesian Models
Class |
Description |
|---|---|
|
Bayesian opponent model |
|
Scalable Bayesian model for large spaces |
|
FSEGA Bayesian model |
|
IAMhaggler Bayesian model |
Agent-Specific Models
Class |
Description |
|---|---|
|
TheFawkes opponent model |
|
InoxAgent opponent model |
Usage Examples¶
Building a Custom Negotiator¶
from negmas.sao import SAOMechanism
from negmas.sao.negotiators import SAONegotiator
from negmas.sao.components import (
TimeBasedOfferingPolicy,
ACNext,
)
from negmas.negotiators.helpers import PolyAspiration
# Create a negotiator with custom components
class MyNegotiator(SAONegotiator):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Time-based offering with boulware curve
self.offering = TimeBasedOfferingPolicy(curve=PolyAspiration(1.0, "boulware"))
# Accept if offer is better than what we'd propose
self.acceptance = ACNext(offering_strategy=self.offering)
Using Genius BOA Components¶
Genius BOA components can be used to build custom negotiators without Java.
from negmas.gb.negotiators.modular.boa import BOANegotiator
from negmas.gb.components.genius import (
GBoulwareOffering,
GACCombi,
GHardHeadedFrequencyModel,
)
# Create a custom HardHeaded-style negotiator
class MyHardHeadedAgent(BOANegotiator):
def __init__(self, **kwargs):
offering = GBoulwareOffering()
acceptance = GACCombi(offering_policy=offering)
model = GHardHeadedFrequencyModel()
super().__init__(
offering=offering, acceptance=acceptance, model=model, **kwargs
)
Combining Multiple Acceptance Strategies¶
from negmas.sao.components import (
AllAcceptanceStrategies,
ACTime,
AcceptAbove,
)
# Accept only if both conditions are met:
# 1. After 80% of negotiation time
# 2. Utility is above 0.6
combined = AllAcceptanceStrategies(
strategies=[
ACTime(tau=0.8),
AcceptAbove(limit=0.6),
]
)
See Also¶
Available Negotiators - Available negotiators
Develop a new negotiator - Creating custom negotiators
negmas.sao - SAO mechanism API reference
negmas.gb - GB mechanism API reference