SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.07815 · 2020

Optimistic Distributionally Robust Policy Optimization

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 4 have no contract verdict; 0 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/2006.07815.json · badge: /api/ran/2006.07815.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
kadysongbb/dr-trpo canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
denormalize Ran
ran on a synthesized input
kadysongbb/dr-trpo/continuous_control/GAC/helpers.py
code served (permissive licence) · get_code("00277beee4c6e0a9")
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 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 numpy as np

torch.manual_seed(0)

# Create a small stand-in class for stats that has std and mean attributes
class Stats:
    def __init__(self):
        self.std = torch.tensor([[0.5, 1.0, 1.5, 2.0]])
        self.mean = torch.tensor([[1.0, 2.0, 3.0, 4.0]])

# Create test data
x = torch.randn(2, 4)
stats = Stats()

ARGS = {
    "x": x,
    "stats": stats
}
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 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
normalize Ran
ran on a synthesized input
kadysongbb/dr-trpo/continuous_control/GAC/helpers.py
code served (permissive licence) · get_code("4a935bce837bbcad")
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 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 tensorflow as tf
import numpy as np

class Stats:
    def __init__(self, mean, var):
        self.mean = mean
        self.var = var

# Create small test data
x = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# Create stats object with mean and variance
mean = np.array([2.5, 3.5, 4.5, 5.5], dtype=np.float32)
var = np.array([1.0, 1.0, 1.0, 1.0], dtype=np.float32)
stats = Stats(mean, var)

ARGS = {
    "x": x,
    "stats": stats
}
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 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
run_episode Ran
ran on a synthesized input
kadysongbb/dr-trpo/tabular/train_helper.py
code served (permissive licence) · get_code("376d051ff6f4515b")
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 numpy as np
import gymnasium as gym
from gymnasium import spaces

torch_seed = 0

class SimplePolicy:
    """Minimal policy with sample() method"""
    def __init__(self, action_space):
        self.action_space = action_space
    
    def sample(self, obs):
        """Sample an action given observation"""
        return self.action_space.sample()

class SimpleEnv(gym.Env):
    """Minimal gym environment for testing"""
    def __init__(self):
        self.observation_space = spaces.Box(low=-1.0, high=1.0, shape=(4,), dtype=np.float32)
        self.action_space = spaces.Box(low=-1.0, high=1.0, shape=(3,), dtype=np.float32)
        self.step_count = 0
        self.max_steps = 5
    
    def reset(self):
        self.step_count = 0
        return self.observation_space.sample().astype(np.float32)
    
    def step(self, action):
        self.step_count += 1
        obs = self.observation_space.sample().astype(np.float32)
        reward = float(np.random.randn())
        done = self.step_count >= self.max_steps
        info = {}
        return obs, reward, done, info
    
    def render(self):
        pass

env = SimpleEnv()
policy = SimplePolicy(env.action_space)

ARGS = {
    "env": env,
    "policy": policy,
    "animate": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gymnasium, numpy — 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
run_policy Ran
ran on a synthesized input
kadysongbb/dr-trpo/tabular/train_helper.py
code served (permissive licence) · get_code("e4f0e8c345e82dae")
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 numpy as np
import gym
from gym import spaces

torch_imported = False
try:
    import torch
    torch_imported = True
except:
    pass

class DummyPolicy:
    """Minimal policy with sample() method"""
    def sample(self, obs):
        # Return a scalar action (works for Discrete action spaces)
        return 0

class DummyLogger:
    """Minimal logger with log() method"""
    def log(self, data):
        pass

class DummyEnv:
    """Minimal gym-like environment"""
    def __init__(self):
        self.observation_space = spaces.Box(low=-1, high=1, shape=(4,), dtype=np.float32)
        self.action_space = spaces.Discrete(2)
        self.step_count = 0
        self.max_steps = 5
    
    def reset(self):
        self.step_count = 0
        return np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
    
    def step(self, action):
        self.step_count += 1
        obs = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
        reward = 1.0
        done = self.step_count >= self.max_steps
        info = {}
        return obs, reward, done, info
    
    def render(self):
        pass

env = DummyEnv()
policy = DummyPolicy()
episodes = 2
logger = DummyLogger()

ARGS = {
    'env': env,
    'policy': policy,
    'episodes': episodes,
    'logger': logger
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, 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
episode_stats Not yet run
unverified (harvested, no recorded run)
kadysongbb/dr-trpo/tabular/train_helper.py
code served (permissive licence) · get_code("2e7a471dea032a49")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 4 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
denormalize 2 other papers
2 dated earlier
1806.07851 (2018-06)
Sim-to-Real Reinforcement Learning for Deformable Object Manipulation
1901.09184 (2019-01)
Action Robust Reinforcement Learning and Applications in Continuous Control

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

Trust Region Policy Optimization (TRPO) and Proximal Policy Optimization (PPO), as the widely employed policy based reinforcement learning (RL) methods, are prone to converge to a sub-optimal solution as they limit the policy representation to a particular parametric distribution class. To address this issue, we develop an innovative Optimistic Distributionally Robust Policy Optimization (ODRPO) algorithm, which effectively utilizes Optimistic Distributionally Robust Optimization (DRO) approach to solve the trust region constrained optimization problem without parameterizing the policies. Our algorithm improves TRPO and PPO with a higher sample efficiency and a better performance of the final policy while attaining the learning stability. Moreover, it achieves a globally optimal policy update that is not promised in the prevailing policy based RL algorithms. Experiments across tabular domains and robotic locomotion tasks demonstrate the effectiveness of our approach.

For agents

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

get_harvested_code_for_paper("2006.07815")
get_code_for_paper("2006.07815")
have("2006.07815")

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

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

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

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

Connect an agent — have() is free.