SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.10049 · 2021

Learning Modular Robot Control Policies

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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 0 have no contract verdict; 4 failures of our instrument; 1 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/2105.10049.json · badge: /api/ran/2105.10049.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
biorobotics/learning_modular_policies canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
get_GNN_params_list Ran
ran; our contract draft was wrong, not the code
biorobotics/learning_modular_policies/modular_policy/pgnn.py
code served (permissive licence) · get_code("f4019f7e953c8d4b")
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. 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 SimpleGNNNode(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super().__init__()
        self.linear1 = nn.Linear(input_dim, output_dim)
        self.linear2 = nn.Linear(output_dim, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Create GNN nodes with parameters
gnn_node_1 = SimpleGNNNode(input_dim=4, output_dim=3)
gnn_node_2 = SimpleGNNNode(input_dim=4, output_dim=3)
gnn_node_3 = SimpleGNNNode(input_dim=4, output_dim=3)

GNN_nodes = [gnn_node_1, gnn_node_2, gnn_node_3]

ARGS = {
    "GNN_nodes": GNN_nodes
}
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 — a list 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_pos_control_inds Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
biorobotics/learning_modular_policies/modular_policy/planning_utils.py
code served (permissive licence) · get_code("d7e665d538f78faa")
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 int; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:41Z. 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

# Analyze the function to understand what arguments it needs:
# 1. modules_types: array-like of module type identifiers (1 for legs, 2 for wheels)
# 2. module_state_len: array-like of state lengths for each module
# 3. module_action_len: array-like of action lengths for each module

# The function expects:
# - modules_types to be indexable and convertible to np.array
# - module_state_len to be indexable and have cumsum computed
# - module_action_len to be indexable and have cumsum computed
# - Indices should be computed such that modules_types has both type 1 (legs) and type 2 (wheels)

# Create a simple scenario with 4 modules:
# Module 0: leg (type 1)
# Module 1: wheel (type 2) 
# Module 2: leg (type 1)
# Module 3: wheel (type 2)

modules_types = [1, 2, 1, 2]

# Each leg module has state length of 4 (2 pos + 2 vel values per leg)
# Each wheel module has state length of 2 (steering angle + something)
module_state_len = [4, 2, 4, 2]

# Each leg module has action length of 2 (one action per joint)
# Each wheel module has action length of 3 (control1, control2, steering)
module_action_len = [2, 3, 2, 3]

ARGS = {
    "modules_types": modules_types,
    "module_state_len": module_state_len,
    "module_action_len": module_action_len,
}
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 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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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_state_dicts Ran
ran; our contract draft was wrong, not the code
biorobotics/learning_modular_policies/modular_policy/pgnn.py
code served (permissive licence) · get_code("65ee4852b0742c6d")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small stand-in GNN node class
class GNNNode(nn.Module):
    def __init__(self, node_type, hidden_dim=4):
        super().__init__()
        self.type = node_type
        self.linear = nn.Linear(hidden_dim, hidden_dim)
    
    def forward(self, x):
        return self.linear(x)

# Create multiple GNN nodes with different types
gnn_node_1 = GNNNode(node_type="encoder")
gnn_node_2 = GNNNode(node_type="decoder")
gnn_node_3 = GNNNode(node_type="attention")

# Create a list of GNN nodes
GNN_nodes = [gnn_node_1, gnn_node_2, gnn_node_3]

ARGS = {
    "GNN_nodes": GNN_nodes
}
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 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
npstr Ran
ran; our contract draft was wrong, not the code
biorobotics/learning_modular_policies/modular_policy/mbrl.py
code served (permissive licence) · get_code("969945204bc296ce")
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 numpy as np

# Create a small numpy array to pass to npstr
test_array = np.array([[1.23456, 2.34567, 3.45678],
                       [4.56789, 5.67890, 6.78901]])

ARGS = {
    "input": test_array
}
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 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
spline_generator Ran
ran, honoured the contract we drafted
biorobotics/learning_modular_policies/modular_policy/generate_random_rollouts.py
code served (permissive licence) · get_code("024c0232a4a12de2")
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 (10, 3) 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
from scipy import interpolate

def spline_generator(num_joints, n_steps, n_sample_pts):
    x = np.linspace(0, n_steps, n_sample_pts)
    y = np.random.normal(0, 0.75, (n_sample_pts, num_joints))
    xnew = np.arange(0, n_steps)
    ynew = np.zeros((n_steps, num_joints))
    for i in range(num_joints):
        tck = interpolate.splrep(x, y[:, i], s=0)
        ynew[:, i] = interpolate.splev(xnew, tck, der=0)
    return ynew

ARGS = {
    "num_joints": 3,
    "n_steps": 10,
    "n_sample_pts": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (10, 3) — shape (10, 3) 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
create_cost_mats2 Not yet run
unverified (harvested, no recorded run)
biorobotics/learning_modular_policies/modular_policy/planning_utils.py
code served (permissive licence) · get_code("780b18db026282ab")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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

Modular robots can be rearranged into a new design, perhaps each day, to handle a wide variety of tasks by forming a customized robot for each new task. However, reconfiguring just the mechanism is not sufficient: each design also requires its own unique control policy. One could craft a policy from scratch for each new design, but such an approach is not scalable, especially given the large number of designs that can be generated from even a small set of modules. Instead, we create a modular policy framework where the policy structure is conditioned on the hardware arrangement, and use just one training process to create a policy that controls a wide variety of designs. Our approach leverages the fact that the kinematics of a modular robot can be represented as a design graph, with nodes as modules and edges as connections between them. Given a robot, its design graph is used to create a policy graph with the same structure, where each node contains a deep neural network, and modules of the same type share knowledge via shared parameters (e.g., all legs on a hexapod share the same network parameters). We developed a model-based reinforcement learning algorithm, interleaving model learning and trajectory optimization to train the policy. We show the modular policy generalizes to a large number of designs that were not seen during training without any additional learning. Finally, we demonstrate the policy controlling a variety of designs to locomote with both simulated and real robots.

For agents

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

get_harvested_code_for_paper("2105.10049")
get_code_for_paper("2105.10049")
have("2105.10049")

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

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

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

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

Connect an agent — have() is free.