SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.14151 · 2024

True Knowledge Comes from Practice: Aligning LLMs with Embodied Environments via Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 3 failures of our instrument; 0 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/2401.14151.json · badge: /api/ran/2401.14151.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
weihaotan/twosome canonical (classifier label)
classifier basis: plan_row
3 ran · 0 no recorded run
FunctionStatusWhere it lives
layer_init Ran
ran; our contract draft was wrong, not the code
weihaotan/twosome/twosome/overcooked/ppo_llm_pomdp.py
pointer only (licence: NONE); the stored copy get_code serves, from jaggbow/saf, is pointer only (licence: NONE) · get_code("beb42d440ccf2925")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, weihaotan/twosome 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.

layer_init Ran
ran; our contract draft was wrong, not the code
weihaotan/twosome/twosome/overcooked/policy_pomdp.py
pointer only (licence: NONE) · get_code("e01d3118f70d5b05")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, weihaotan/twosome 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.

make_env Ran
ran; our contract draft was wrong, not the code
weihaotan/twosome/twosome/virtualhome/inference_ppo_llm_v1.py
pointer only (licence: NOASSERTION) · get_code("2e54f2ecd0d61798")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, weihaotan/twosome (NOASSERTION). 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.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 2 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, 1 later) and 1 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 28 other papers
13 dated earlier, 12 later, 2 same year, order not determinable, 1 undated · 2 only as an assembly brick
1611.02779 (2016-11)
RL$^2$: Fast Reinforcement Learning via Slow Reinforcement Learning
1611.05763 (2016-11)
Learning to reinforcement learn
1703.03400 (2017-03)
Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
and 25 more not named here

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

Despite the impressive performance across numerous tasks, large language models (LLMs) often fail in solving simple decision-making tasks due to the misalignment of the knowledge in LLMs with environments. On the contrary, reinforcement learning (RL) agents learn policies from scratch, which makes them always align with environments but difficult to incorporate prior knowledge for efficient explorations. To narrow the gap, we propose TWOSOME, a novel general online framework that deploys LLMs as decision-making agents to efficiently interact and align with embodied environments via RL without requiring any prepared datasets or prior knowledge of the environments. Firstly, we query the joint probabilities of each valid action with LLMs to form behavior policies. Then, to enhance the stability and robustness of the policies, we propose two normalization methods and summarize four prompt design principles. Finally, we design a novel parameter-efficient training architecture where the actor and critic share one frozen LLM equipped with low-rank adapters (LoRA) updated by PPO. We conduct extensive experiments to evaluate TWOSOME. i) TWOSOME exhibits significantly better sample efficiency and performance compared to the conventional RL method, PPO, and prompt tuning method, SayCan, in both classical decision-making environment, Overcooked, and simulated household environment, VirtualHome. ii) Benefiting from LLMs' open-vocabulary feature, TWOSOME shows superior generalization ability to unseen tasks. iii) Under our framework, there is no significant loss of the LLMs' original ability during online PPO finetuning.

For agents

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

get_harvested_code_for_paper("2401.14151")
get_code_for_paper("2401.14151")
have("2401.14151")

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

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

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

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

Connect an agent — have() is free.