SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2211.00801 · 2022

Multi-Agent Reinforcement Learning for Adaptive Mesh Refinement

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2211.00801.json · badge: /api/ran/2211.00801.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
011235813/marl-amr canonical (classifier label)
classifier basis not recorded on the link
5 ran · 5 no recorded run
FunctionStatusWhere it lives
find_common_neighbors Ran
ran on a synthesized input
011235813/marl-amr/marl_amr/envs/graph_utils.py
code served (permissive licence) · get_code("629ebc04789c2043")
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 dict. 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 numpy as np

# Create a simple test case for map_eid_adjlist
# The function expects a dictionary from int to np.array
# where each key is an entity ID and values are arrays of neighbor IDs

map_eid_adjlist = {
    0: np.array([1, 2]),           # entity 0 has neighbors 1 and 2
    1: np.array([0, 2, 3]),        # entity 1 has neighbors 0, 2, 3
    2: np.array([0, 1, 3]),        # entity 2 has neighbors 0, 1, 3
    3: np.array([1, 2]),           # entity 3 has neighbors 1, 2
}

ARGS = {
    "map_eid_adjlist": map_eid_adjlist
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_map_agent_id_to_idx Ran
ran on a synthesized input
011235813/marl-amr/marl_amr/envs/graph_utils.py
code served (permissive licence) · get_code("5293b852d1b5718c")
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 dict. 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 numpy as np

# The function takes obs_dict which is a map from agent_id (str) to agent observation (np.array)
# It iterates through the keys and creates a mapping from agent_id to index
# No methods or attributes are called on the observations themselves, only on the dict

obs_dict = {
    "agent_0": np.array([1.0, 2.0, 3.0, 4.0]),
    "agent_1": np.array([5.0, 6.0, 7.0, 8.0]),
    "agent_2": np.array([9.0, 10.0, 11.0, 12.0]),
}

ARGS = {
    "obs_dict": obs_dict,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_map_element_id_to_idx Ran
ran on a synthesized input
011235813/marl-amr/marl_amr/envs/graph_utils.py
code served (permissive licence) · get_code("cbb204ebe1861a0e")
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 dict. 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 numpy as np

class MockAgent:
    def __init__(self, elem_id):
        self._elem_id = elem_id
    
    def elem(self):
        return self._elem_id

class MockAgentManager:
    def __init__(self, agents_dict):
        self.agents = agents_dict

# Create mock agents with distinct element IDs
agent1 = MockAgent(elem_id=10)
agent2 = MockAgent(elem_id=20)
agent3 = MockAgent(elem_id=30)

# Create agent manager with agents keyed by agent_id strings
agents_dict = {
    "agent_0": agent1,
    "agent_1": agent2,
    "agent_2": agent3,
}
agent_manager = MockAgentManager(agents_dict)

# Create observation dict mapping agent_id to observation array
obs_dict = {
    "agent_0": np.array([1.0, 2.0, 3.0, 4.0]),
    "agent_1": np.array([5.0, 6.0, 7.0, 8.0]),
    "agent_2": np.array([9.0, 10.0, 11.0, 12.0]),
}

ARGS = {
    "agent_manager": agent_manager,
    "obs_dict": obs_dict,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
importance_sampling_weights Ran
ran on a synthesized input
011235813/marl-amr/marl_amr/alg/replay.py
code served (permissive licence) · get_code("3c3f8fc0e829a79c")
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

# Create valid arguments for importance_sampling_weights

# probabilities: Array of sampling probabilities for a subset of items
# These should be positive values less than or equal to 1
probabilities = np.array([0.3, 0.2, 0.4, 0.1])

# uniform_probability: Probability of sampling an item if uniformly sampling
# For 4 items, uniform probability would be 0.25, but we use a valid probability
uniform_probability = 0.25

# exponent: Scalar that controls importance sampling correction (0 to 1)
exponent = 0.5

# normalize: Whether to scale weights so maximum is 1
normalize = True

ARGS = {
    "probabilities": probabilities,
    "uniform_probability": uniform_probability,
    "exponent": exponent,
    "normalize": normalize,
}
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
test_baseline Ran
ran on a synthesized input
011235813/marl-amr/marl_amr/alg/evaluate.py
code served (permissive licence) · get_code("ee141d2ac98e09b9")
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 (5,) 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

class SimplePolicy:
    """A callable policy that takes a sim object and returns an action."""
    def __call__(self, sim):
        return np.array([0.1, -0.2])

class SimpleSim:
    """A minimal sim object for the policy to use."""
    pass

class SimpleEnv:
    """A minimal environment with reset, step, and sim attribute."""
    def __init__(self):
        self.sim = SimpleSim()
        self.episode_count = 0
    
    def reset(self):
        self.episode_count += 1
        self.step_count = 0
        return np.array([1.0, 2.0, 3.0])
    
    def step(self, action):
        self.step_count += 1
        obs_next = np.array([1.1, 2.1, 3.1])
        reward = 1.5
        done = self.step_count >= 3
        info = {
            'error': 0.05,
            'cumulative_error': 0.15,
            'num_refined': 2
        }
        return obs_next, reward, done, info

policy = SimplePolicy()
env = SimpleEnv()

ARGS = {
    'n_eval': 2,
    'policy': policy,
    'env': env,
    'error_str': 'error'
}
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 (5,) — shape (5,) 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
NoisyLinear Not yet run
unverified (harvested, no recorded run)
011235813/marl-amr/marl_amr/alg/custom_graphnet.py
code served (permissive licence) · get_code("36056784ebb39ccd")
How it ran

no invocation recorded.

conv Not yet run
unverified (harvested, no recorded run)
011235813/marl-amr/marl_amr/alg/networks.py
code served (permissive licence) · get_code("c5fe645f7157a226")
How it ran

no invocation recorded.

convnet Not yet run
unverified (harvested, no recorded run)
011235813/marl-amr/marl_amr/alg/networks.py
code served (permissive licence) · get_code("c4f6852981fd5e95")
How it ran

no invocation recorded.

mlp Not yet run
unverified (harvested, no recorded run)
011235813/marl-amr/marl_amr/alg/networks.py
code served (permissive licence) · get_code("841b1316c52b02a5")
How it ran

no invocation recorded.

test Not yet run
unverified (harvested, no recorded run)
011235813/marl-amr/marl_amr/alg/evaluate.py
code served (permissive licence) · get_code("aba74a8f90c0a8eb")
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, 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 10 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-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

Adaptive mesh refinement (AMR) is necessary for efficient finite element simulations of complex physical phenomenon, as it allocates limited computational budget based on the need for higher or lower resolution, which varies over space and time. We present a novel formulation of AMR as a fully-cooperative Markov game, in which each element is an independent agent who makes refinement and de-refinement choices based on local information. We design a novel deep multi-agent reinforcement learning (MARL) algorithm called Value Decomposition Graph Network (VDGN), which solves the two core challenges that AMR poses for MARL: posthumous credit assignment due to agent creation and deletion, and unstructured observations due to the diversity of mesh geometries. For the first time, we show that MARL enables anticipatory refinement of regions that will encounter complex features at future times, thereby unlocking entirely new regions of the error-cost objective landscape that are inaccessible by traditional methods based on local error estimators. Comprehensive experiments show that VDGN policies significantly outperform error threshold-based policies in global error and cost metrics. We show that learned policies generalize to test problems with physical features, mesh geometries, and longer simulation times that were not seen in training. We also extend VDGN with multi-objective optimization capabilities to find the Pareto front of the tradeoff between cost and error.

For agents

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

get_harvested_code_for_paper("2211.00801")
get_code_for_paper("2211.00801")
have("2211.00801")

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

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

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

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

Connect an agent — have() is free.