SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.10728 · NeurIPS · 2024

Randomized Exploration in Cooperative Multi-Agent Reinforcement Learning

Pan Xu, Miroslav Pajic, Hao-Lun Hsu, Weixin Wang

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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 0 have no contract verdict; 11 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2404.10728.json · badge: /api/ran/2404.10728.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
panxulab/MARL-CoopTS canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
FunctionStatusWhere it lives
get_env_group_title Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Envs/env.py
code served (permissive licence) · get_code("2f905812818cfe89")
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 str. 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 gym
from unittest.mock import Mock

# Create a minimal mock environment that satisfies the function's requirements
mock_env = Mock()

# Create a mock spec with entry_point attribute
mock_spec = Mock()
mock_spec.entry_point = "gym.envs.classic_control:CartPoleEnv"

# Create a mock unwrapped environment
mock_unwrapped = Mock()
mock_unwrapped.spec = mock_spec

# Set the unwrapped attribute on the main environment
mock_env.unwrapped = mock_unwrapped

ARGS = {
    "env": mock_env
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
layer_init Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/components/network.py
code served (permissive licence) · get_code("3a9ab37bf0498c42")
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 Linear. 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)

# Create a simple linear layer to be initialized
layer = nn.Linear(in_features=4, out_features=3, bias=True)

# Define arguments for layer_init function
ARGS = {
    'layer': layer,
    'init_type': 'xavier_uniform_',
    'nonlinearity': 'relu',
    'w_scale': 1.0
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
make_atari Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Envs/wrapper.py
code served (permissive licence) · get_code("97d520547d641ca3")
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 TimeLimit. 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 gym
import numpy as np
from gym import spaces

class DummyAtariEnv(gym.Env):
    """Minimal Atari-like environment for testing"""
    def __init__(self):
        self.observation_space = spaces.Box(
            low=0, high=255, shape=(84, 84), dtype=np.uint8
        )
        self.action_space = spaces.Discrete(4)
        self._step_count = 0
        self.np_random = np.random.RandomState(0)
    
    def get_action_meanings(self):
        return ['NOOP', 'FIRE', 'UP', 'DOWN']
    
    def reset(self):
        self._step_count = 0
        return self.observation_space.sample()
    
    def step(self, action):
        self._step_count += 1
        obs = self.observation_space.sample()
        reward = 1.0
        done = self._step_count >= 100
        info = {}
        return obs, reward, done, info
    
    @property
    def unwrapped(self):
        return self

env = DummyAtariEnv()

ARGS = {
    'env': env,
    'max_episode_steps': 1000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TimeLimit — a TimeLimit output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TimeLimit 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
make_atari_ram Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Envs/wrapper.py
code served (permissive licence) · get_code("6e20067b946fd1a6")
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 EpisodicLifeEnv. 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 gym
import numpy as np
from gym import spaces

class MockAtariEnv(gym.Env):
    """Mock Atari environment for testing."""
    def __init__(self):
        self.observation_space = spaces.Box(low=0, high=255, shape=(84, 84), dtype=np.uint8)
        self.action_space = spaces.Discrete(4)
        self._step_count = 0
        self._lives = 5
        self.ale = self
        
    def get_action_meanings(self):
        return ['NOOP', 'FIRE', 'UP', 'DOWN']
    
    def lives(self):
        return self._lives
    
    def reset(self, **kwargs):
        self._step_count = 0
        self._lives = 5
        return np.zeros((84, 84), dtype=np.uint8)
    
    def step(self, action):
        self._step_count += 1
        obs = np.ones((84, 84), dtype=np.uint8) * 100
        reward = 1.0
        done = self._step_count >= 100
        info = {}
        return obs, reward, done, info
    
    def render(self, mode='human'):
        pass
    
    def close(self):
        pass
    
    @property
    def unwrapped(self):
        return self

env = MockAtariEnv()

ARGS = {
    'env': env,
    'max_episode_steps': 500,
    'scale': True,
    'episode_life': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EpisodicLifeEnv — a EpisodicLifeEnv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EpisodicLifeEnv 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
make_minatar Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Envs/wrapper.py
code served (permissive licence) · get_code("e421ba90850058c8")
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 ScaledFloatFrame. 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 gym
import numpy as np
from gym.wrappers.time_limit import TimeLimit

# Create a minimal gym environment
class DummyEnv(gym.Env):
    def __init__(self):
        self.observation_space = gym.spaces.Box(
            low=0, high=255, shape=(84, 84, 1), dtype=np.uint8
        )
        self.action_space = gym.spaces.Discrete(4)
    
    def step(self, action):
        obs = np.random.randint(0, 256, (84, 84, 1), dtype=np.uint8)
        reward = 0.0
        done = False
        info = {}
        return obs, reward, done, info
    
    def reset(self):
        return np.random.randint(0, 256, (84, 84, 1), dtype=np.uint8)
    
    def render(self, mode='human'):
        pass
    
    def close(self):
        pass

env = DummyEnv()

ARGS = {
    "env": env,
    "max_episode_steps": 1000,
    "scale": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ScaledFloatFrame — a ScaledFloatFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ScaledFloatFrame 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
moving_average Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Utils/plotter.py
code served (permissive licence) · get_code("4b34dcb9354b0216")
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 ndarray, ndim 1, dtype family float, shape (8,) 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 numpy as np

# Construct valid arguments for moving_average function
values = np.array([1.0, 2.0, 3.0, 4.0, 5.0, np.nan, 7.0, 8.0], dtype=np.float64)
window = 3

ARGS = {
    "values": values,
    "window": window,
}
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 ndarray, ndim 1, dtype family float, shape (8,) — shape (8,) 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
one_sided_ema Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
panxulab/MARL-CoopTS/Utils/plotter.py
code served (permissive licence) · get_code("4c7f1bb29c0359ac")
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 tuple, ndim 2, 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

# Create simple test data
np.random.seed(0)

# Generate sorted x values
xolds = np.linspace(0, 10, 20)
# Generate corresponding y values
yolds = np.sin(xolds) + np.random.normal(0, 0.1, 20)

# Define arguments for one_sided_ema
ARGS = {
    'xolds': xolds,
    'yolds': yolds,
    'low': 1.0,
    'high': 9.0,
    'n': 512,
    'decay_steps': 1.0,
    'low_counts_threshold': 0.0
}
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 tuple, ndim 2, dtype family float — a tuple 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
str_to_class Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Utils/helper.py
code served (permissive licence) · get_code("a6a00df86213599f")
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 type. 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 torch

# Create a test module to use with str_to_class
class TestModule:
    class TestClass:
        def __init__(self):
            self.value = "test"
    
    class AnotherClass:
        def __init__(self):
            self.name = "another"

# Register the test module in sys.modules
sys.modules['test_module'] = TestModule()

# Define arguments for str_to_class function
ARGS = {
    'module_name': 'test_module',
    'class_name': 'TestClass'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
symmetric_ema Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
panxulab/MARL-CoopTS/Utils/plotter.py
code served (permissive licence) · get_code("0c9382678ab52826")
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 tuple, ndim 2, 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

# Create sample data for testing
np.random.seed(0)

# Create x values (sorted in ascending order)
xolds = np.array([0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0])

# Create corresponding y values
yolds = np.array([1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 3.8, 3.5, 3.2, 3.0])

# Define ARGS dictionary with all parameters for symmetric_ema
ARGS = {
    'xolds': xolds,
    'yolds': yolds,
    'low': 0.5,
    'high': 9.5,
    'n': 512,
    'decay_steps': 1.0,
    'low_counts_threshold': 0.0
}
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 tuple, ndim 2, dtype family float — a tuple 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
to_numpy Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Utils/helper.py
code served (permissive licence) · get_code("2b4a57cd27204619")
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 ndarray, ndim 2, dtype family float, shape (2, 4) 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

torch.manual_seed(0)

# Create a small tensor on CPU
t = torch.randn(2, 4)

ARGS = {
    "t": t
}
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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
to_tensor Ran
ran; our contract draft was wrong, not the code
panxulab/MARL-CoopTS/Utils/helper.py
code served (permissive licence) · get_code("4639c5105d18bded")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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)

# Construct arguments for to_tensor function
x = np.array([[1.0, 2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0, 8.0]])

device = 'cpu'

ARGS = {
    'x': x,
    'device': device
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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
layer_init 1 other paper
1 dated earlier
2106.07841 (2021-06)
Randomized Exploration for Reinforcement Learning with General Value Function Approximation
str_to_class 1 other paper
1 dated earlier
2205.10868 (2022-05)
Memory-efficient Reinforcement Learning with Value-based Knowledge Consolidation
to_numpy 1 other paper
1 dated earlier
2205.10868 (2022-05)
Memory-efficient Reinforcement Learning with Value-based Knowledge Consolidation
to_tensor 1 other paper
1 dated earlier
2205.10868 (2022-05)
Memory-efficient Reinforcement Learning with Value-based Knowledge Consolidation

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

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 present the first study on provably efficient randomized exploration in cooperative multi-agent reinforcement learning (MARL). We propose a unified algorithm framework for randomized exploration in parallel Markov Decision Processes (MDPs), and two Thompson Sampling (TS)-type algorithms, CoopTS-PHE and CoopTS-LMC, incorporating the perturbed-history exploration (PHE) strategy and the Langevin Monte Carlo exploration (LMC) strategy, respectively, which are flexible in design and easy to implement in practice. For a special class of parallel MDPs where the transition is (approximately) linear, we theoretically prove that both CoopTS-PHE and CoopTS-LMC achieve a O(d 3/2 H 2 √ M K) regret bound with communication complexity O(dHM 2 ), where d is the feature dimension, H is the horizon length, M is the number of agents, and K is the number of episodes. This is the first theoretical result for randomized exploration in cooperative MARL. We evaluate our proposed method on multiple parallel RL environments, including a deep exploration problem (i.e., N -chain), a video game, and a real-world problem in energy systems. Our experimental results support that our framework can achieve better performance, even under conditions of misspecified transition models. Additionally, we establish a connection between our unified framework and the practical application of federated learning.

For agents

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

get_harvested_code_for_paper("2404.10728")
get_code_for_paper("2404.10728")
have("2404.10728")

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

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

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

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

Connect an agent — have() is free.