SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.10740 · IJCAI · 2024

N-Agent Ad Hoc Teamwork

Caroline Wang

arXiv · PDF · Open in the Atlas

Code that ran

13 of 18 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; 4 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 6 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2404.10740.json · badge: /api/ran/2404.10740.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
carolinewang01/naht marked official in Papers with Code
Papers with Code archive
13 ran · 5 no recorded run
FunctionStatusWhere it lives
Decoder Ran
ran on a synthesized input
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("decf5619178286a6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned tuple. 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 as th
import torch.nn.functional as F
import torch.nn as nn
import copy

def get_clones(module, N):
    return nn.ModuleList([copy.deepcopy(module) for i in range(N)])

def init_(module, weight_init, bias_init, gain=0.01):
    weight_init(module.weight.data, gain=gain)
    bias_init(module.bias.data)
    return module

def init_module(m, gain=0.01):
    return init_(m, nn.init.orthogonal_, lambda x: nn.init.constant_(x, 0), gain=gain)

class Decoder(nn.Module):

    def __init__(self, args, input_dim, hidden_dim, output_dim1, output_dim2):
        super(Decoder, self).__init__()
        self.args = args
        if hasattr(self.args, 'n_ed_hidden_layers'):
            self._layer_N = self.args.n_ed_hidden_layers
        else:
            self._layer_N = 1
        self.fc_h = init_module(nn.Linear(hidden_dim, hidden_dim))
        self.fc1 = init_module(nn.Linear(input_dim, hidden_dim))
        self.fc1_list = get_clones(self.fc_h, self._layer_N)
        self.out1 = init_module(nn.Linear(hidden_dim, output_dim1))
        self.fc2 = init_module(nn.Linear(input_dim, hidden_dim))
        self.fc2_list = get_clones(self.fc_h, self._layer_N)
        self.out2 = init_module(nn.Linear(hidden_dim, output_dim2))
        self.ed_bce_loss = args.ed_bce_loss

    def forward(self, x):
        h1 = F.relu(self.fc1(x))
        for i in range(self._layer_N):
            h1 = F.relu(self.fc1_list[i](h1))
        pred1 = self.out1(h1)
        if self.ed_bce_loss:
            pred1 = th.sigmoid(pred1)
        h2 = F.relu(self.fc2(x))
        for i in range(self._layer_N):
            h2 = F.relu(self.fc2_list[i](h2))
        pred2 = self.out2(h2)
        return (pred1, pred2)


class Args:
    def __init__(self):
        self.n_ed_hidden_layers = 2
        self.ed_bce_loss = True


INIT_ARGS = {
    'args': Args(),
    'input_dim': 4,
    'hidden_dim': 8,
    'output_dim1': 3,
    'output_dim2': 5,
}

ARGS = {
    'x': th.randn(2, 4),
}

decoder = Decoder(**INIT_ARGS)
pred1, pred2 = decoder(**ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Encoder Ran
ran on a synthesized input
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("50670f3f053281ae")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned tuple. 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 as th
import torch.nn as nn
from types import SimpleNamespace

# Create args object with required attributes
args = SimpleNamespace()
args.use_orthogonal_init = True
args.hidden_dim = 8
args.ed_hidden_dim = 8
args.n_ed_hidden_layers = 2
args.n_agents = 3

# INIT_ARGS for Encoder.__init__(args, input_dim, hidden_dim, output_dim)
INIT_ARGS = {
    'args': args,
    'input_dim': 5,
    'hidden_dim': 8,
    'output_dim': 6
}

# ARGS for Encoder.forward(x, hidden)
batch_size = 2
n_agents = 3
input_dim = 5
hidden_dim = 8

x = th.randn(batch_size * n_agents, input_dim)
hidden = th.randn(batch_size * n_agents, hidden_dim)

ARGS = {
    'x': x,
    'hidden': hidden
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RunningMeanStd Ran
ran on a synthesized input
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("cdfc3ae6a09e2c06")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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
from typing import Tuple

class RunningMeanStd(object):

    def __init__(self, epsilon: float=0.0001, shape: Tuple[int, ...]=(), device='cpu'):
        """
        https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm
        """
        self.mean = torch.zeros(shape, dtype=torch.float32, device=device)
        self.var = torch.ones(shape, dtype=torch.float32, device=device)
        self.count = epsilon

    def update(self, arr):
        arr = arr.reshape(-1, arr.size(-1))
        batch_mean = torch.mean(arr, dim=0)
        batch_var = torch.var(arr, dim=0)
        batch_count = arr.shape[0]
        self.update_from_moments(batch_mean, batch_var, batch_count)

    def update_from_moments(self, batch_mean, batch_var, batch_count: int):
        delta = batch_mean - self.mean
        tot_count = self.count + batch_count
        new_mean = self.mean + delta * batch_count / tot_count
        m_a = self.var * self.count
        m_b = batch_var * batch_count
        m_2 = m_a + m_b + torch.square(delta) * self.count * batch_count / (self.count + batch_count)
        new_var = m_2 / (self.count + batch_count)
        new_count = batch_count + self.count
        self.mean = new_mean
        self.var = new_var
        self.count = new_count


INIT_ARGS = {
    'epsilon': 0.0001,
    'shape': (4,),
    'device': 'cpu'
}

ARGS = {
    'arr': torch.randn(2, 4)
}

METHOD = 'update'

if __name__ == '__main__':
    rms = RunningMeanStd(**INIT_ARGS)
    rms.update(**ARGS)
    print("Mean:", rms.mean)
    print("Var:", rms.var)
    print("Count:", rms.count)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
build_decoder_inputs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("ee21a41775ec3b15")
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) and returned Tensor, ndim 5, dtype family float, shape (2, 3, 4, 3, 9) 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 as th

th.manual_seed(0)

# Create a small embeddings tensor
# Shape: (bs, ts, n_agents, feat_shape)
# bs=2, ts=3, n_agents=4, feat_shape=5
embeddings = th.randn(2, 3, 4, 5)

ARGS = {
    "embeddings": embeddings
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (2, 3, 4, 3, 9) — shape (2, 3, 4, 3, 9) 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
build_decoder_targets Ran
ran; our contract draft was wrong, not the code
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("12650fb5320297ab")
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. 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 as th
th.manual_seed(0)

class BatchDict:
    def __init__(self, batch_size, max_seq_length, n_agents, obs_dim, action_dim):
        self.batch_size = batch_size
        self.max_seq_length = max_seq_length
        self.obs = th.randn(batch_size, max_seq_length, n_agents, obs_dim)
        self.actions_onehot = th.randn(batch_size, max_seq_length, n_agents, action_dim)
    
    def __getitem__(self, key):
        if key == 'obs':
            return self.obs
        elif key == 'actions_onehot':
            return self.actions_onehot
        raise KeyError(key)

n_agents = 3
batch_size = 2
max_seq_length = 4
obs_dim = 5
action_dim = 6

batch = BatchDict(batch_size, max_seq_length, n_agents, obs_dim, action_dim)
mask = th.ones(batch_size, max_seq_length, n_agents)

ARGS = {
    'n_agents': n_agents,
    'batch': batch,
    'mask': mask,
    't': None,
    'concat_agents': False,
    'concat_obs_act': True
}
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 tuple — a tuple output has no array shape of its own; none is 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
get_decoder_input_shape Ran
ran, honoured the contract we drafted
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("ce3d7a4b82a638f0")
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 torch
import torch.nn as nn

torch.manual_seed(0)

n_agents = 5
embed_dim = 8

ARGS = {
    "n_agents": n_agents,
    "embed_dim": embed_dim,
}
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 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
get_decoder_target_shape Ran
ran, honoured the contract we drafted
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("60bd05be25d7d285")
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) and returned tuple, ndim 1, 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 torch
import numpy as np

torch.manual_seed(0)

# The function accesses scheme['obs']['vshape'] and scheme['actions_onehot']['vshape'][0]
# So scheme is a dict with nested structure containing vshape values

scheme = {
    'obs': {
        'vshape': 8  # observation size
    },
    'actions_onehot': {
        'vshape': (5,)  # action size as tuple, will access [0]
    }
}

n_agents = 3

ARGS = {
    'n_agents': n_agents,
    'scheme': scheme
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — 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
get_encoder_input_shape Ran
ran, honoured the contract we drafted
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("c3f86bfb832dbf6f")
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) 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 torch
import numpy as np

torch.manual_seed(0)

# The function expects a scheme dict with:
# - 'obs' key containing a dict with 'vshape' key
# - 'actions_onehot' key containing a dict with 'vshape' key (which is indexable)

scheme = {
    'obs': {
        'vshape': 5
    },
    'actions_onehot': {
        'vshape': (3,)
    }
}

ARGS = {
    'scheme': scheme
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
get_noop_act Ran
ran, honoured the contract we drafted
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("d94f9dd6c081c4c5")
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 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 torch as th

th.manual_seed(0)

class Args:
    def __init__(self, env, n_actions, env_args=None):
        self.env = env
        self.n_actions = n_actions
        self.env_args = env_args or {}

# Test case 1: sc2 environment
ARGS_SC2 = {
    'args': Args(env='sc2', n_actions=8, env_args={}),
    'device': 'cpu'
}

# Test case 2: stag_hunt environment
ARGS_STAG = {
    'args': Args(env='stag_hunt', n_actions=5, env_args={}),
    'device': 'cpu'
}

# Test case 3: mpe environment
ARGS_MPE = {
    'args': Args(env='mpe_test', n_actions=4, env_args={'key': 'mpe_scenario'}),
    'device': 'cpu'
}

# Test case 4: matrixgames environment
ARGS_MATRIX = {
    'args': Args(env='matrixgames_test', n_actions=3, env_args={'key': 'matrixgames_coord'}),
    'device': 'cpu'
}

# Use one of the test cases as the primary ARGS
ARGS = ARGS_SC2
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 list, ndim 2, dtype family float — 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
huber_loss Ran
ran; our contract draft was wrong, not the code
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("317a7486c52962a6")
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) 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 torch.nn as nn

torch.manual_seed(0)

# The function huber_loss takes two parameters:
# e: error tensor (used with abs, comparison, and arithmetic operations)
# d: delta parameter (used with comparison and arithmetic operations)
# Both should be tensors that support float operations

e = torch.randn(2, 4)
d = torch.tensor(1.0)

ARGS = {
    "e": e,
    "d": d,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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
init_ Ran
ran; our contract draft was wrong, not the code
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("698b01ea40ca5a88")
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 module with weight and bias
module = nn.Linear(in_features=4, out_features=3)

# Define weight_init function that takes data and gain parameter
def weight_init(data, gain=0.01):
    nn.init.xavier_uniform_(data, gain=gain)

# Define bias_init function that takes data
def bias_init(data):
    nn.init.zeros_(data)

ARGS = {
    "module": module,
    "weight_init": weight_init,
    "bias_init": bias_init,
    "gain": 0.01
}
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
init_module Ran
ran; our contract draft was wrong, not the code
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("9ded5889e3e2d76b")
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 module with weight and bias attributes
# The function init_module accesses module.weight.data and module.bias.data
module = nn.Linear(4, 3)

# Define ARGS dict with all parameters of init_module
ARGS = {
    "m": module,
    "gain": 0.01
}
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
init_rnn Ran
ran; our contract draft was wrong, not the code
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("df7b2fc8884413af")
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 GRU. 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)

# Build a minimal RNN module
rnn_module = nn.GRU(input_size=4, hidden_size=3, num_layers=1, batch_first=True)

# The function iterates over named_parameters() and accesses 'bias' and 'weight' in param names,
# then calls nn.init functions on those params. We need an nn.Module with parameters.

ARGS = {
    'rnn_module': rnn_module,
    'use_orthogonal': True
}
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 GRU — a GRU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GRU 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
AgentOwnedMAC Not yet run
unverified (harvested, no recorded run)
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("505384d4158b80a9")
How it ran

no invocation recorded.

EpisodeBatch Not yet run
unverified (harvested, no recorded run)
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("15588c43eb314917")
How it ran

no invocation recorded.

POAMLearner Not yet run
unverified (harvested, no recorded run)
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("8867ac4821051cc7")
How it ran

no invocation recorded.

build_encoder_inputs Not yet run
unverified (harvested, no recorded run)
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("19257cfb3879548b")
How it ran

no invocation recorded.

compute_per_agent_terminated_mask Not yet run
unverified (harvested, no recorded run)
carolinewang01/naht/src/learners/poam_learner.py
code served (permissive licence) · get_code("23e2047615c7cea6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 17 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
huber_loss
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2402.06700 (2024-02)
Entropy-Regularized Token-Level Policy Optimization for Language Agent Reinforcement

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

Current approaches to learning cooperative multiagent behaviors assume relatively restrictive settings. In fully cooperative multi-agent reinforcement learning, the learning algorithm controls all agents in the scenario, while in ad hoc teamwork, the learning algorithm usually assumes control over only a single agent in the scenario. However, many cooperative settings in the real world are much less restrictive. For example, in an autonomous driving scenario, a company might train its cars to cooperate with each other, yet once on the road, these cars must additionally cooperate with cars from other companies. Towards expanding the class of scenarios that cooperative learning methods may optimally address, this research agenda introduces and proposes to study N -agent ad hoc teamwork (NAHT), where a set of autonomous agents must interact and cooperate with dynamically varying numbers and types of teammates.

For agents

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

get_harvested_code_for_paper("2404.10740")
get_code_for_paper("2404.10740")
have("2404.10740")

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

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

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

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

Connect an agent — have() is free.