negmas.models.strategy¶
Opponent offering-strategy modeling.
Models that predict the opponent’s offering strategy (the survey’s “bidding strategy”) —
the function mapping the negotiation state to the opponent’s next offer (or, more
tractably, to the utility the opponent’s own offers will yield over time). This corresponds
to attribute §5.4 (“Learning the bidding strategy”) of the opponent-modeling taxonomy of
Baarslag, Hendrikx, Hindriks & Jonker, Learning about the opponent in automated bilateral
negotiation: a comprehensive survey of opponent modeling techniques, JAAMAS 30:849–898
(2016). We use offering in the class names to match negmas naming conventions (e.g.
negmas.gb.components.offering).
The survey groups these models into regression analysis and time-series forecasting
techniques. The concrete example below (TimeSeriesOfferingModel) belongs to the
time-series-forecasting family: it forecasts the concession trajectory of the opponent from
the sequence of utilities of its past offers.
- class negmas.models.strategy.DerivativeOfferingModel(min_observations: int = 3)[source]¶
Bases:
OpponentOfferingModelForecasts the opponent’s offers from the derivatives of its concession curve.
A time-series-forecasting offering-strategy model (survey §5.4.2) following Brzostowski et al. [29]. Finite differences of the observed concession curve estimate its local first and second derivatives, which are extrapolated (second-order Taylor step) to forecast future offers. The model also exposes a
time_influence()metric — the sign-consistency of the differences (survey eq. 8) — measuring how strongly the opponent behaves like a pure time-dependent tactician (1= perfectly consistent,0= inconsistent).- Parameters:
min_observations – Minimum observations before extrapolation is used; below it
predict_utility()falls back to the last observed utility.
AI Generated (Brzostowski et al. derivative-based offer forecaster).
- predict_utility(relative_time: float) float[source]¶
Forecasts the opponent’s offer utility via second-order extrapolation.
- Returns:
Forecast utility clamped to
[0, 1]; falls back to the last observed utility (or a linear step) when data are scarce.- Return type:
- time_influence() float[source]¶
Returns the sign-consistency of the first differences (survey eq. 8).
- Returns:
A value in
[0, 1];1means every consecutive change had the same sign (consistent with a pure time-dependent tactic),0means the changes alternated. Returnsnanwith fewer than two differences.- Return type:
- class negmas.models.strategy.MarkovChainOfferingModel(n_states: int = 10, alpha: float = 1.0)[source]¶
Bases:
OpponentOfferingModelForecasts the opponent’s offers with a Markov chain over concession states.
A time-series-forecasting offering-strategy model (survey §5.4.2) following Narayanan & Jennings [140]. The opponent’s utility is discretized into
n_statesbins; the observed sequence of states estimates a (Laplace-smoothed) transition matrix. The chain is then rolled forward from the current state to forecast the expected utility of a future offer.- Parameters:
n_states – Number of discrete utility states (bins over
[0, 1]).alpha – Laplace-smoothing pseudo-count added to every transition.
AI Generated (Narayanan & Jennings Markov-chain offer forecaster).
- predict_next_utility() float[source]¶
Forecasts the expected utility of the opponent’s next offer (one step).
- Returns:
Expected utility of the next state; the last observed utility if no transitions have been seen yet.
- Return type:
- predict_utility(relative_time: float) float[source]¶
Forecasts the opponent’s offer utility at
relative_time.The number of steps to roll the chain forward is estimated from the average time between observed offers and the remaining time to
relative_time.- Returns:
Expected forecast utility; the last observed utility when the time is not in the future or no transitions are known.
- Return type:
- class negmas.models.strategy.OpponentOfferingModel[source]¶
Bases:
ABCAbstract base class for models that predict the opponent’s offering strategy.
The model observes the utility of each opponent offer (as estimated by an opponent utility model, or any agreed monotone proxy) against relative time, and predicts the utility the opponent’s offers will reach at a future time — i.e. how far the opponent is expected to have conceded by then.
Relative time is assumed to run from
0(start) to1(deadline).
- class negmas.models.strategy.PolynomialOfferingModel(degree: int = 3, min_observations: int | None = None)[source]¶
Bases:
OpponentOfferingModelForecasts the opponent’s concession curve by polynomial regression.
A regression-analysis offering-strategy model (survey §5.4.1). It fits a polynomial of a given
degreeto the(relative_time, opponent_utility)trace (least squares) and evaluates it at the queried time. This is the polynomial-interpolation estimator compared by Papaioannou et al. [151,153] (they also evaluate cubic splines and a genetic-algorithm fit).- Parameters:
degree – Degree of the fitted polynomial (
3≈ the cubic used in the survey). The effective degree is capped atn_observations - 1.min_observations – Minimum observations before regression is used; below it
predict_utility()falls back to the last observed utility. Defaults todegree + 1.
AI Generated (Papaioannou et al. polynomial offer forecaster).
- class negmas.models.strategy.TimeSeriesOfferingModel(min_observations: int = 3, **regressor_kwargs)[source]¶
Bases:
OpponentOfferingModelForecasts the opponent’s concession curve via Gaussian-process regression.
This is a time-series-forecasting offering-strategy model (survey §5.4). It fits a regressor of utility-of-opponent-offer against relative time and uses it to forecast how the opponent will offer in the future. It re-uses
FutureUtilityRegressor(a Gaussian-process regressor) rather than reinventing the regression machinery.- predict_utility(relative_time: float) float[source]¶
Forecasts the opponent’s offer utility at
relative_time.- Parameters:
relative_time – The relative time (0-1) to forecast for.
- Returns:
Forecast utility; falls back to the last observed utility when there is insufficient data to fit the regressor.
- Return type: