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.
Genius Acceptance Policies¶
Class |
Description |
|---|---|
|
Base class for Genius acceptance policies |
|
Accept if better than next offer |
|
Accept above constant threshold |
|
Time-based acceptance |
|
Accept based on previous offers |
|
Gap-based acceptance |
|
Always accept |
|
Always reject |
|
Combined acceptance strategy |
|
Combined with max aggregation |
|
Combined with average aggregation |
|
Combined with best average |
|
Combined version 2 |
|
Combined version 3 |
|
Combined version 4 |
|
Combined max in sliding window |
|
Probabilistic combined acceptance |
|
Discounted constant threshold |
|
Discounted best average |
|
Discounted max in window |
|
Discounted probabilistic |
Genius Offering Policies¶
Class |
Description |
|---|---|
|
Base class for Genius offering policies |
|
Time-dependent bidding strategy |
|
Random bidding |
|
Boulware (tough) bidding |
|
Conceder (soft) bidding |
|
Linear concession bidding |
|
Hardliner (no concession) bidding |
|
Chooses from all possible bids |
Genius Opponent Models¶
Class |
Description |
|---|---|
|
Base class for opponent models |
|
Default opponent model |
|
Assumes uniform preferences |
|
Assumes opposite preferences |
|
HardHeaded frequency-based model |
|
Smith frequency-based model |
|
AgentX frequency-based model |
|
Nash-based frequency model |
|
Bayesian opponent model |
|
Scalable Bayesian 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¶
from negmas.sao.components import (
GBoulwareOffering,
GACCombi,
GHardHeadedFrequencyModel,
)
# Genius-style components
offering = GBoulwareOffering()
acceptance = GACCombi()
opponent_model = GHardHeadedFrequencyModel()
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