SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1808.09637 · 2018

Decoupling Strategy and Generation in Negotiation Dialogues

arXiv · PDF · Open in the Atlas

Code that ran

4 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1808.09637.json · badge: /api/ran/1808.09637.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
stanfordnlp/cocoa community (classifier label)
classifier basis not recorded on the link
3 ran · 4 no recorded run
GeneralCoder365/agreemate community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
FunctionStatusWhere it lives
is_entity Ran
ran on a synthesized input
stanfordnlp/cocoa/cocoa/core/entity.py
code served (permissive licence) · get_code("79624785a930cf93")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from collections import namedtuple

class CanonicalEntity(namedtuple('CanonicalEntity', ['value', 'type'])):
    __slots__ = ()

    def __str__(self):
        return '[%s]' % str(self.value)

class Entity(namedtuple('Entity', ['surface', 'canonical'])):
    __slots__ = ()

    @classmethod
    def from_elements(cls, surface=None, value=None, type=None):
        if value is None:
            value = surface
        return super(cls, Entity).__new__(cls, surface, CanonicalEntity(value, type))

    def __str__(self):
        return '[%s|%s]' % (str(self.surface), str(self.canonical.value))

def is_entity(x):
    return isinstance(x, Entity) or isinstance(x, CanonicalEntity)

# Test case 1: Entity instance
entity_obj = Entity.from_elements(surface="apple", value="FRUIT", type="noun")

# Test case 2: CanonicalEntity instance
canonical_obj = CanonicalEntity(value="book", type="noun")

# Test case 3: Non-entity object
non_entity = "random string"

ARGS = {
    'x': entity_obj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ngram_count Ran
ran on a synthesized input
stanfordnlp/cocoa/cocoa/lib/multi_bleu.py
code served (permissive licence) · get_code("21919b592b94f529")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Counter. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from collections import Counter

torch.manual_seed(0)

# Analyze the function:
# - ngram_count takes 'words' (a sequence) and 'n' (an integer)
# - It uses zip(*[words[i:] for i in range(n)]) to create n-grams
# - It checks if n <= len(words)
# - Returns a Counter object

# Create test arguments
words = ["hello", "world", "how", "are", "you"]
n = 2

ARGS = {
    "words": words,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Counter — a Counter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Counter output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
random_multinomial Ran
ran on a synthesized input
stanfordnlp/cocoa/cocoa/core/util.py
code served (permissive licence) · get_code("051b6d3efcdab50c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

random.seed(42)

# The function expects 'probs' to be an indexable sequence of numbers
# that sum to approximately 1.0 (since it's used as probabilities in a
# multinomial sampling algorithm). The function iterates through indices
# until the accumulated sum exceeds a random value in [0, 1).

probs = [0.2, 0.3, 0.25, 0.25]

ARGS = {
    "probs": probs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
setup_experiment_dir Ran
ran on a synthesized input
GeneralCoder365/agreemate/archive/baseline/run_experiments.py
code served (permissive licence) · get_code("7cca4b0ef5f1ee30")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import sys
import logging
import tempfile
from pathlib import Path
from datetime import datetime

# Create a temporary directory for the base_dir
temp_base_dir = tempfile.mkdtemp()

ARGS = {
    'base_dir': temp_base_dir,
    'experiment_name': 'test_experiment'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_symlink_mapping Not yet run
unverified (harvested, no recorded run)
GeneralCoder365/agreemate/finetuning/symlink_mapper.py
code served (permissive licence) · get_code("ef864fbfa299918d")
How it ran

no invocation recorded.

generate_uuid Not yet run
unverified (harvested, no recorded run)
stanfordnlp/cocoa/cocoa/core/util.py
code served (permissive licence) · get_code("a55a15cdcc72d117")
How it ran

no invocation recorded.

max_count Not yet run
unverified (harvested, no recorded run)
stanfordnlp/cocoa/cocoa/lib/multi_bleu.py
code served (permissive licence) · get_code("48ea52618655ff60")
How it ran

no invocation recorded.

min_count Not yet run
unverified (harvested, no recorded run)
stanfordnlp/cocoa/cocoa/lib/multi_bleu.py
code served (permissive licence) · get_code("0f4b9388caba5928")
How it ran

no invocation recorded.

tokenize Not yet run
unverified (harvested, no recorded run)
stanfordnlp/cocoa/cocoa/core/tokenizer.py
code served (permissive licence) · get_code("702b27974999a98a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
is_entity 2 other papers
2 later
2010.09954 (2020-10)
Improving Dialog Systems for Negotiation with Personality Modeling
2204.08426 (2022-04)
CHAI: A CHatbot AI for Task-Oriented Dialogue with Offline Reinforcement Learning
tokenize 2 other papers
2 later
2010.09954 (2020-10)
Improving Dialog Systems for Negotiation with Personality Modeling
2204.08426 (2022-04)
CHAI: A CHatbot AI for Task-Oriented Dialogue with Offline Reinforcement Learning
random_multinomial 1 other paper
1 later
2204.08426 (2022-04)
CHAI: A CHatbot AI for Task-Oriented Dialogue with Offline Reinforcement Learning

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We consider negotiation settings in which two agents use natural language to bargain on goods. Agents need to decide on both high-level strategy (e.g., proposing \$50) and the execution of that strategy (e.g., generating "The bike is brand new. Selling for just \$50."). Recent work on negotiation trains neural models, but their end-to-end nature makes it hard to control their strategy, and reinforcement learning tends to lead to degenerate solutions. In this paper, we propose a modular approach based on coarse di- alogue acts (e.g., propose(price=50)) that decouples strategy and generation. We show that we can flexibly set the strategy using supervised learning, reinforcement learning, or domain-specific knowledge without degeneracy, while our retrieval-based generation can maintain context-awareness and produce diverse utterances. We test our approach on the recently proposed DEALORNODEAL game, and we also collect a richer dataset based on real items on Craigslist. Human evaluation shows that our systems achieve higher task success rate and more human-like negotiation behavior than previous approaches.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1808.09637")
get_code_for_paper("1808.09637")
have("1808.09637")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1808.09637.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1808.09637.svg)](https://syntology.ai/paper/1808.09637)

Connect an agent — have() is free.