SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1901.09216 · 2019

Modelling Bounded Rationality in Multi-Agent Interactions by Generalized Recursive Reasoning

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 4 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/1901.09216.json · badge: /api/ran/1901.09216.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
ying-wen/gr2 canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
checkerboard Ran
ran on a synthesized input
ying-wen/gr2/code/maci/distributions/real_nvp_bijector.py
code served (permissive licence) · get_code("e20241ffb27fdd20")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

ARGS = {
    'shape': (8,),
    'parity': 'even',
    'dtype': tf.bool
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
heatmap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ying-wen/gr2/code/maci/plot.py
code served (permissive licence) · get_code("3ef71138411e0095")
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 1, 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
import matplotlib.pyplot as plt

# Create a small 2D numpy array for the heatmap data
data = np.random.rand(4, 3)  # 4 rows, 3 columns

# Create row labels (4 labels for 4 rows)
row_labels = ['Row_A', 'Row_B', 'Row_C', 'Row_D']

# Create column labels (3 labels for 3 columns)
col_labels = ['Col_1', 'Col_2', 'Col_3']

# Create a matplotlib axes object
fig, ax = plt.subplots()

# Create colorbar kwargs dictionary
cbar_kw = {'shrink': 0.8}

# Create cbarlabel string
cbarlabel = 'Value'

# Additional kwargs to pass to imshow
imshow_kwargs = {'cmap': 'viridis'}

# Combine all arguments into ARGS dict
ARGS = {
    'data': data,
    'row_labels': row_labels,
    'col_labels': col_labels,
    'ax': ax,
    'cbar_kw': cbar_kw,
    'cbarlabel': cbarlabel,
    'cmap': 'viridis'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — 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 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
projection Ran
ran on a synthesized input
ying-wen/gr2/code/maci/utils.py
code served (permissive licence) · get_code("a292492441660b58")
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 1, 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
import numpy as np

torch.manual_seed(0)

# The function takes PI (a list that it modifies in-place) and threshold
# PI should be a list of numbers that will be adjusted
# Based on the function logic, it needs to be a mutable list of floats

PI = [0.2, 0.3, 0.15, 0.25]

threshold = 0.1

ARGS = {
    "PI": PI,
    "threshold": threshold
}
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 list, ndim 1, 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
shape_el Ran
ran; our contract draft was wrong, not the code
ying-wen/gr2/code/maci/distributions/common.py
pointer only (licence: MIT); the stored copy get_code serves, from sihongho/robust_marl_with_state_uncertainty, is pointer only (licence: NONE) · get_code("aad5113d0b095522")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sihongho/robust_marl_with_state_uncertainty, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sigmoid Ran
ran on a synthesized input
ying-wen/gr2/code/maci/utils.py
code served (permissive licence) · get_code("db4eab2810a17578")
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 (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 numpy as np

# Analyze the function: sigmoid(x, derivative=False)
# The function uses:
# - x: a numpy array or scalar that supports arithmetic operations
# - derivative: a boolean flag

# Create test inputs
x_input = np.array([0.5, 1.5, -1.0, 2.0])

ARGS = {
    "x": x_input,
    "derivative": False
}
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 (4,) — shape (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
softmax Ran
ran, honoured the contract we drafted
ying-wen/gr2/code/maci/utils.py
code served (permissive licence) · get_code("91fe7a23c1c052b7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (3, 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 numpy as np

# Create a simple 2D array for testing softmax
# Using shape (3, 4) to have distinct dimensions
x = np.array([[1.0, 2.0, 3.0, 4.0],
              [2.0, 3.0, 4.0, 5.0],
              [3.0, 4.0, 5.0, 6.0]])

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 2, dtype family float, shape (3, 4) — shape (3, 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
annotate_heatmap Not yet run
unverified (harvested, no recorded run)
ying-wen/gr2/code/maci/plot.py
code served (permissive licence) · get_code("ba45f82a48ab3a78")
How it ran

no invocation recorded.

conditioned_real_nvp_template Not yet run
unverified (harvested, no recorded run)
ying-wen/gr2/code/maci/distributions/real_nvp_flow.py
code served (permissive licence) · get_code("2a88c74b929c3777")
How it ran

no invocation recorded.

deep_clone Not yet run
unverified (harvested, no recorded run)
ying-wen/gr2/code/maci/core/serializable.py
code served (permissive licence) · get_code("026ed64900497cf5")
How it ran

no invocation recorded.

feedforward_net Not yet run
unverified (harvested, no recorded run)
ying-wen/gr2/code/maci/distributions/real_nvp_bijector.py
code served (permissive licence) · get_code("c72e67905cf81bd6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 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
shape_el 4 other papers
4 later
1905.02363 (2019-05)
Dimension-Wise Importance Sampling Weight Clipping for Sample-Efficient Reinforcement Learning
2006.14154 (2020-06)
Strictly Batch Imitation Learning by Energy-based Distribution Matching
2212.02705 (2022-12)
What is the Solution for State-Adversarial Multi-Agent Reinforcement Learning?
and 1 more not named here
softmax 4 other papers
1 dated earlier, 3 later
1804.08049 (2018-04)
Semi-supervised User Geolocation via Graph Convolutional Networks
1905.03381 (2019-05)
AutoAssist: A Framework to Accelerate Training of Deep Neural Networks
2202.07304 (2022-02)
XAI for Transformers: Better Explanations through Conservative Propagation
and 1 more not named here
heatmap 1 other paper
1 dated earlier
1809.05870 (2018-09)
On-Line Learning of Linear Dynamical Systems: Exponential Forgetting in Kalman Filters

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

Though limited in real-world decision making, most multi-agent reinforcement learning (MARL) models assume perfectly rational agents -- a property hardly met due to individual's cognitive limitation and/or the tractability of the decision problem. In this paper, we introduce generalized recursive reasoning (GR2) as a novel framework to model agents with different \emph{hierarchical} levels of rationality; our framework enables agents to exhibit varying levels of "thinking" ability thereby allowing higher-level agents to best respond to various less sophisticated learners. We contribute both theoretically and empirically. On the theory side, we devise the hierarchical framework of GR2 through probabilistic graphical models and prove the existence of a perfect Bayesian equilibrium. Within the GR2, we propose a practical actor-critic solver, and demonstrate its convergent property to a stationary point in two-player games through Lyapunov analysis. On the empirical side, we validate our findings on a variety of MARL benchmarks. Precisely, we first illustrate the hierarchical thinking process on the Keynes Beauty Contest, and then demonstrate significant improvements compared to state-of-the-art opponent modeling baselines on the normal-form games and the cooperative navigation benchmark.

For agents

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

get_harvested_code_for_paper("1901.09216")
get_code_for_paper("1901.09216")
have("1901.09216")

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

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

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

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

Connect an agent — have() is free.