SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.11778 · 2020

Too many cooks: Bayesian inference for coordinating multi-agent collaboration

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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 7 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2003.11778.json · badge: /api/ran/2003.11778.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
rosewang2008/gym-cooking community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
agent_settings Ran
ran on a synthesized input
rosewang2008/gym-cooking/gym_cooking/utils/utils.py
code served (permissive licence) · get_code("6b13b1dbc1f7e739")
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 SimpleModel. 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 torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

class ArglistConfig:
    def __init__(self):
        self.model1 = SimpleModel()
        self.model2 = SimpleModel()
        self.model3 = SimpleModel()
        self.model4 = SimpleModel()

arglist = ArglistConfig()

ARGS = {
    'arglist': arglist,
    'agent_name': 'agent-1'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
euclidean_dist Ran
ran on a synthesized input
rosewang2008/gym-cooking/gym_cooking/navigation_planner/utils.py
code served (permissive licence) · get_code("eec0f58f2d01d720")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

np.random.seed(0)

A = np.array([1.0, 2.0, 3.0, 4.0])
B = np.array([5.0, 6.0, 7.0, 8.0])

ARGS = {
    "A": A,
    "B": B,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
get_single_actions Ran
ran on a synthesized input
rosewang2008/gym-cooking/gym_cooking/navigation_planner/utils.py
code served (permissive licence) · get_code("1717064d17c6c872")
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 list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

class Object:
    def __init__(self, name="object"):
        self.name = name

class Delivery:
    def __init__(self):
        self.collidable = False

class GridSquare:
    def __init__(self, collidable=False, holding=None):
        self.collidable = collidable
        self.holding = holding

class World:
    def __init__(self):
        self.grid = {}
        # Populate grid with some positions
        for i in range(5):
            for j in range(5):
                self.grid[(i, j)] = GridSquare(collidable=False)
    
    def inbounds(self, loc):
        # Check if location is within bounds (0-4, 0-4)
        if 0 <= loc[0] < 5 and 0 <= loc[1] < 5:
            return loc
        return None
    
    def get_gridsquare_at(self, loc):
        if loc in self.grid:
            return self.grid[loc]
        return GridSquare(collidable=True)

class SimAgent:
    def __init__(self, location, holding=None):
        self.location = location
        self.holding = holding

class Environment:
    def __init__(self):
        self.world = World()
        self.sim_agents = [
            SimAgent(location=(1, 1), holding=None),
            SimAgent(location=(3, 3), holding=None)
        ]

def mergeable(obj1, obj2):
    # Simple mergeable check
    return True

# Create instances
env = Environment()
agent = SimAgent(location=(2, 2), holding=None)

# Set up a delivery location
env.world.grid[(1, 2)] = GridSquare(collidable=False, holding=Delivery())

# Set up some objects in the world
env.world.grid[(3, 2)] = GridSquare(collidable=False, holding=Object("obj1"))

ARGS = {
    "env": env,
    "agent": agent
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
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
is_smaller Ran
ran on a synthesized input
rosewang2008/gym-cooking/gym_cooking/navigation_planner/utils.py
code served (permissive licence) · get_code("d9524f1bbfdbd61f")
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.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - is_smaller takes two parameters: p_ and p
# - p_ is indexed with [0], so it should be indexable (tuple, list, or tensor)
# - p can be either a tuple or a scalar
# - When p is not a tuple, it compares p_[0] < p
# - When p is a tuple, it compares p_ < p (lexicographic tuple comparison)

# Case 1: p is a scalar, p_ is indexable
p_ = (5, 10)  # tuple with first element 5
p = 8  # scalar

ARGS = {
    "p_": p_,
    "p": p
}
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 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
make_action_graph Ran
ran on a synthesized input
rosewang2008/gym-cooking/gym_cooking/recipe_planner/utils.py
code served (permissive licence) · get_code("c59ec5d73539bc45")
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 DiGraph. 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 networkx as nx
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np

class Predicate:
    def __init__(self, name, args):
        self.name = name
        self.args = args

    def __eq__(self, other):
        return self.name == other.name and self.args == other.args

    def __hash__(self):
        return hash((self.name, tuple(self.args) if isinstance(self.args, list) else self.args))

    def __str__(self):
        return '{}({})'.format(self.name, ', '.join(self.args))

    def __copy__(self):
        return type(self)(self.args[0])

class NoPredicate(Predicate):
    def __init__(self, obj=None):
        self.name = None
        self.args = (None,)

    def __str__(self):
        return 'None'

class Action:
    def __init__(self, name, pre=None, post_add=None):
        self.name = name
        self.pre = pre if pre is not None else set()
        self.post_add = post_add if post_add is not None else set()
    
    def __str__(self):
        return self.name
    
    def __hash__(self):
        return hash(self.name)
    
    def __eq__(self, other):
        return self.name == other.name

# Create initial state (not directly used in the function but parameter exists)
initial = None

# Create action objects with predicates
p1 = Predicate("holding", ["obj1"])
p2 = Predicate("clear", ["obj2"])
p3 = Predicate("on", ["obj1", "obj2"])

action1 = Action("pickup", pre={p1}, post_add={p2})
action2 = Action("stack", pre={p1, p2}, post_add={p3})
action3 = Action("putdown", pre={p1}, post_add={p2, p3})

action_path = [action1, action2, action3]

ARGS = {
    "initial": initial,
    "action_path": action_path,
    "draw": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DiGraph — a DiGraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DiGraph output the recorded ndim 1 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
make_graph Ran
ran on a synthesized input
rosewang2008/gym-cooking/gym_cooking/recipe_planner/utils.py
code served (permissive licence) · get_code("f799744e32faa64b")
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 Graph. 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 networkx as nx
import matplotlib.pyplot as plt
import numpy as np

# Create a simple graph
g = nx.Graph()
g.add_edges_from([(0, 1), (1, 2), (2, 0)])

# Create node labels dictionary
node_labels = {0: "A", 1: "B", 2: "C"}

# Create edge labels dictionary
edge_labels = {(0, 1): "e1", (1, 2): "e2", (2, 0): "e3"}

# Set draw to False to avoid showing the plot
draw = False

ARGS = {
    "g": g,
    "node_labels": node_labels,
    "edge_labels": edge_labels,
    "draw": draw
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Graph — a Graph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Graph output the recorded ndim 1 and dtype family int 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
make_predicate_graph Ran
ran on a synthesized input
rosewang2008/gym-cooking/gym_cooking/recipe_planner/utils.py
code served (permissive licence) · get_code("f31ea7e721255ed9")
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 DiGraph. 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 networkx as nx
import matplotlib.pyplot as plt
import numpy as np

class Predicate:
    def __init__(self, name, args):
        self.name = name
        self.args = args

    def __eq__(self, other):
        return self.name == other.name and self.args == other.args

    def __hash__(self):
        return hash((self.name, self.args))

    def __str__(self):
        return '{}({})'.format(self.name, ', '.join(self.args))

    def __copy__(self):
        return type(self)(self.args[0])

class NoPredicate(Predicate):
    def __init__(self, obj=None):
        self.name = None
        self.args = (None,)

    def __str__(self):
        return 'None'

class Fresh(Predicate):
    def __init__(self, obj):
        Predicate.__init__(self, 'Fresh', (obj,))

class State:
    def __init__(self, predicates):
        self.predicates = predicates

class Action:
    def __init__(self, name, pre, post_add):
        self.name = name
        self.pre = pre
        self.post_add = post_add
    
    def __str__(self):
        return self.name

# Create initial state with predicates
no_pred = NoPredicate()
pred1 = Predicate('On', ('A', 'B'))
pred2 = Predicate('Clear', ('A',))

initial_state = State(predicates=[no_pred, pred1, pred2])

# Create action path
action1 = Action('Move', pre=[pred1, pred2], post_add=[Predicate('On', ('A', 'C')), Fresh('Pot')])
action2 = Action('Stack', pre=[Predicate('On', ('A', 'C'))], post_add=[Predicate('Stacked', ('A', 'C'))])

action_path = [action1, action2]

ARGS = {
    'initial': initial_state,
    'action_path': action_path,
    'draw': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DiGraph — a DiGraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DiGraph output the recorded ndim 1 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
mergeable Not yet run
unverified (harvested, no recorded run)
rosewang2008/gym-cooking/gym_cooking/utils/core.py
code served (permissive licence) · get_code("333e618dc5ad404e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 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.

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-21.

Repositories linked to this paper

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

Abstract

Collaboration requires agents to coordinate their behavior on the fly, sometimes cooperating to solve a single task together and other times dividing it up into sub-tasks to work on in parallel. Underlying the human ability to collaborate is theory-of-mind, the ability to infer the hidden mental states that drive others to act. Here, we develop Bayesian Delegation, a decentralized multi-agent learning mechanism with these abilities. Bayesian Delegation enables agents to rapidly infer the hidden intentions of others by inverse planning. We test Bayesian Delegation in a suite of multi-agent Markov decision processes inspired by cooking problems. On these tasks, agents with Bayesian Delegation coordinate both their high-level plans (e.g. what sub-task they should work on) and their low-level actions (e.g. avoiding getting in each other's way). In a self-play evaluation, Bayesian Delegation outperforms alternative algorithms. Bayesian Delegation is also a capable ad-hoc collaborator and successfully coordinates with other agent types even in the absence of prior experience. Finally, in a behavioral experiment, we show that Bayesian Delegation makes inferences similar to human observers about the intent of others. Together, these results demonstrate the power of Bayesian Delegation for decentralized multi-agent collaboration.

For agents

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

get_harvested_code_for_paper("2003.11778")
get_code_for_paper("2003.11778")
have("2003.11778")

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

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

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

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

Connect an agent — have() is free.