closedhumanPR #42Negotiation
The Dealmakers: multi-attribute bargaining, Pareto frontier, agents learning to trade off price vs quantity
Multi-attribute negotiation scenario where buyer-seller pairs bargain simultaneously over price × quantity. Unlike price-only strategies, agents must explore both axes to reach the Pareto frontier — a joint optimum invisible to…
Author
@cloud-post-code
github profile →- Status
- Closed without merging
- Opened on
- Jun 27
- Branch
- hackathon/The_Dealmakers
Description
The pitch.
## Summary Multi-attribute negotiation scenario where buyer-seller pairs bargain simultaneously over **price × quantity**. Unlike price-only strategies, agents must explore both axes to reach the Pareto frontier — a joint optimum invisible to `alternating_offers`. **The integrative tension:** buyers have a convex sweet-spot on quantity (they dislike over-ordering as much as under-ordering), sellers prefer larger volumes. Because their ideal quantities differ and both utility functions respond in opposite directions, a Pareto-optimal contract exists that is strictly better for *both* parties than either opening position. ## What's in the PR - **`packages/nest-core/nest_core/scenarios_builtin/dealmakers.py`** — `DealParams` (deterministic utility params per role), `DealmakerAgent` (buyer/seller with cross-session EMA learning), and `dealmakers_factory` - **`scenarios/dealmakers.yaml`** — 8 buyer-seller pairs, seed 13, 10 rounds - **`packages/nest-core/nest_core/scenarios.py`** — registers `dealmakers` - **`packages/nest-core/nest_core/validators.py`** — 3 validators: `sessions_closed`, `pareto_progress` (quantity axis must move), `learning_emitted` (every closer emits `learn:` line) - **`packages/nest-core/tests/test_dealmakers.py`** — 19 tests covering params, strategies, learning, integration, determinism, validators, and Pareto exploration ## Three built-in strategies | Strategy | Mechanism | |---|---| | `logrolling` | Stay on iso-utility contour, maximise estimated opponent utility | | `ttt_mirror` | Mirror the opponent's last per-axis movement | | `nash_split` | Propose midpoint biased toward own reservation with rounds | ## Cross-session learning Each agent maintains a per-partner EMA estimate of opponent weight on price vs quantity, updated after every closed session. The agent emits a `learn:` trace line recording the updated estimate. In subsequent sessions the estimate biases counter-proposals toward the opponent's revealed preferences. ## Validators 1. **`dealmakers_sessions_closed`** — every pair that exchanged offers must have exactly one `close:` line 2. **`dealmakers_pareto_progress`** — at least one pair must move the quantity axis (proving Pareto exploration beyond price-only) 3. **`dealmakers_learning_emitted`** — every agent that closed a session must emit a `learn:` line ## Test plan - [x] `uv sync` — clean - [x] `uv run ruff check .` — 0 errors - [x] `uv run ruff format --check .` — 0 diffs - [x] `uv run pyright` — 0 new errors (1 pre-existing in `test_pareto_strategies.py`) - [x] `uv run pytest -v` — 643 passed, 1 skipped 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/42/head:pr-42
git checkout pr-42