SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.14430 · NeurIPS · 2020

Munchausen Reinforcement Learning

Nino Vieillard, Olivier Pietquin, Matthieu Geist

arXiv · PDF · Open in the Atlas

Code that ran

12 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (11 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 11 have no contract verdict; 0 failures of our instrument; 10 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/2007.14430.json · badge: /api/ran/2007.14430.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
lingweizhu/Pytorch-MunchausenActorCritic community
Papers with Code archive
9 ran · 6 no recorded run
deepmind/acme community
Papers with Code archive
3 ran · 4 no recorded run
FunctionStatusWhere it lives
CateoricalPolicy Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("5755feadde38c8e8")
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 an instance of its own class, CateoricalPolicy: the run constructed the object and did not call it, so no result was computed. 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
from torch.nn import functional as F
from torch.distributions import Categorical

torch.manual_seed(0)

class Flatten(nn.Module):
    def forward(self, x):
        return x.view(x.size(0), -1)

def initialize_weights_he(m):
    if isinstance(m, nn.Linear) or isinstance(m, nn.Conv2d):
        torch.nn.init.kaiming_uniform_(m.weight)
        if m.bias is not None:
            torch.nn.init.constant_(m.bias, 0)

class BaseNetwork(nn.Module):
    def save(self, path):
        torch.save(self.state_dict(), path)

    def load(self, path):
        self.load_state_dict(torch.load(path))

class DQNBase(BaseNetwork):
    def __init__(self, num_channels):
        super(DQNBase, self).__init__()
        self.net = nn.Sequential(
            nn.Conv2d(num_channels, 32, kernel_size=8, stride=4, padding=0),
            nn.ReLU(),
            nn.Conv2d(32, 64, kernel_size=4, stride=2, padding=0),
            nn.ReLU(),
            nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=0),
            nn.ReLU(),
            Flatten()
        ).apply(initialize_weights_he)

    def forward(self, states):
        return self.net(states)

class CateoricalPolicy(BaseNetwork):
    def __init__(self, num_channels, num_actions):
        super().__init__()
        self.conv = DQNBase(num_channels)
        self.head = nn.Sequential(
            nn.Linear(7 * 7 * 64, 512),
            nn.ReLU(inplace=True),
            nn.Linear(512, num_actions)
        )

    def act(self, states):
        states = self.conv(states)
        action_logits = self.head(states)
        greedy_actions = torch.argmax(action_logits, dim=1, keepdim=True)
        return greedy_actions

    def sample(self, states):
        states = self.conv(states)
        action_probs = F.softmax(self.head(states), dim=1)
        action_dist = Categorical(action_probs)
        actions = action_dist.sample().view(-1, 1)
        z = (action_probs == 0.0).float() * 1e-08
        action_probs = action_probs + z
        log_action_probs = torch.log(action_probs)
        return (actions, action_probs, log_action_probs)

ARGS = {
    "num_channels": 3,
    "num_actions": 5,
}
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 CateoricalPolicy — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CateoricalPolicy 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
DQNBase Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("81e3bb6b8f3a8963")
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 an instance of its own class, DQNBase: the run constructed the object and did not call it, so no result was computed. 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)

# DQNBase expects num_channels as a parameter
# num_channels should be an integer representing the number of input channels
# Looking at the forward method, it expects states tensor with shape (batch, num_channels, height, width)

ARGS = {
    'num_channels': 3
}
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 DQNBase — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DQNBase 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
LazyMemory Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("3dafc0e0e5fc8869")
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 an instance of its own class, LazyMemory: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)
np.random.seed(0)

# LazyMemory.__init__ takes: capacity, state_shape, device
# state_shape is used to construct empty numpy arrays of shape (batch_size, *state_shape)
# The class stores states as lists and accesses them by index
# States are expected to be numpy arrays of dtype uint8 (based on ByteTensor conversion)

capacity = 10
state_shape = (4, 3)  # Small image-like shape: height=4, width=3
device = 'cpu'

ARGS = {
    'capacity': capacity,
    'state_shape': state_shape,
    'device': device,
}
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 LazyMemory — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LazyMemory 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
LazyMultiStepMemory Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("95cfd13ecea4b3d9")
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 an instance of its own class, LazyMultiStepMemory: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)
np.random.seed(0)

# LazyMultiStepMemory constructor parameters:
# capacity, state_shape, device, gamma=0.99, multi_step=3

ARGS = {
    'capacity': 100,
    'state_shape': (4, 84, 84),
    'device': 'cpu',
    'gamma': 0.99,
    'multi_step': 3
}
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 LazyMultiStepMemory — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LazyMultiStepMemory 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
MPOParams Ran
ran on a synthesized input · constructed an object; no result was computed
deepmind/acme/acme/jax/losses/mpo.py
code served (permissive licence) · get_code("b0bd64a5291ade62")
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 an instance of its own class, MPOParams: the run constructed the object and did not call it, so no result was computed. 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 jax.numpy as jnp

# Create small JAX arrays for MPOParams
log_temperature = jnp.array([0.5])
log_alpha_mean = jnp.array([1.0, 2.0])
log_alpha_stddev = jnp.array([0.1, 0.2, 0.3])
log_penalty_temperature = jnp.array([0.3, 0.4, 0.5, 0.6])

ARGS = {
    "log_temperature": log_temperature,
    "log_alpha_mean": log_alpha_mean,
    "log_alpha_stddev": log_alpha_stddev,
    "log_penalty_temperature": log_penalty_temperature,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MPOParams — the run constructed an instance of its own class and did not call it; no shape 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
MPOStats Ran
ran on a synthesized input · constructed an object; no result was computed
deepmind/acme/acme/jax/losses/mpo.py
code served (permissive licence) · get_code("3c56fd89d0f7a624")
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 an instance of its own class, MPOStats: the run constructed the object and did not call it, so no result was computed. 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 jax.numpy as jnp
from typing import NamedTuple, Optional, Union

class MPOStats(NamedTuple):
    """NamedTuple to store loss statistics."""
    dual_alpha_mean: Union[float, jnp.ndarray]
    dual_alpha_stddev: Union[float, jnp.ndarray]
    dual_temperature: Union[float, jnp.ndarray]
    loss_policy: Union[float, jnp.ndarray]
    loss_alpha: Union[float, jnp.ndarray]
    loss_temperature: Union[float, jnp.ndarray]
    kl_q_rel: Union[float, jnp.ndarray]
    kl_mean_rel: Union[float, jnp.ndarray]
    kl_stddev_rel: Union[float, jnp.ndarray]
    q_min: Union[float, jnp.ndarray]
    q_max: Union[float, jnp.ndarray]
    pi_stddev_min: Union[float, jnp.ndarray]
    pi_stddev_max: Union[float, jnp.ndarray]
    pi_stddev_cond: Union[float, jnp.ndarray]
    penalty_kl_q_rel: Optional[float] = None

ARGS = {
    "dual_alpha_mean": jnp.array(0.5),
    "dual_alpha_stddev": jnp.array(0.1),
    "dual_temperature": jnp.array(0.2),
    "loss_policy": jnp.array(1.5),
    "loss_alpha": jnp.array(0.3),
    "loss_temperature": jnp.array(0.4),
    "kl_q_rel": jnp.array(0.6),
    "kl_mean_rel": jnp.array(0.7),
    "kl_stddev_rel": jnp.array(0.8),
    "q_min": jnp.array(-2.0),
    "q_max": jnp.array(5.0),
    "pi_stddev_min": jnp.array(0.05),
    "pi_stddev_max": jnp.array(2.0),
    "pi_stddev_cond": jnp.array(1.2),
    "penalty_kl_q_rel": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MPOStats — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MPOStats output the recorded ndim 1 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
MultiStepBuff Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("a28f79e622630932")
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 an instance of its own class, MultiStepBuff: the run constructed the object and did not call it, so no result was computed. 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
from collections import deque

# The MultiStepBuff class only takes maxlen as a parameter
# Looking at the implementation:
# - maxlen is used to initialize deques in reset()
# - It should be a positive integer
# - The class stores states, actions, and rewards which can be any type
# - append() adds (state, action, reward) tuples
# - get() and _nstep_return() work with numpy operations on rewards

ARGS = {
    "maxlen": 3
}
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 MultiStepBuff — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultiStepBuff 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
MunchausenACAgent Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("acef77cb6c31e18f")
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 an instance of its own class, MunchausenACAgent: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np
from collections import namedtuple
import os
import tempfile

torch.manual_seed(0)
np.random.seed(0)

# Create minimal mock environment
class MockEnv:
    def __init__(self):
        self.observation_space = type('obj', (object,), {'shape': (4,)})()
        self.action_space = type('obj', (object,), {
            'sample': lambda: np.random.randint(0, 3),
            'n': 3
        })()
        self.state = np.zeros(4, dtype=np.float32)
    
    def seed(self, s):
        pass
    
    def reset(self):
        self.state = np.random.randn(4).astype(np.float32)
        return self.state
    
    def step(self, action):
        next_state = np.random.randn(4).astype(np.float32)
        reward = float(np.random.randn())
        done = False
        info = {}
        return next_state, reward, done, info

# Mock memory classes
class LazyMultiStepMemory:
    def __init__(self, capacity, state_shape, device, gamma, multi_step):
        self.capacity = capacity
        self.state_shape = state_shape
        self.device = device
        self.gamma = gamma
        self.multi_step = multi_step
        self.buffer = deque(maxlen=capacity)
    
    def append(self, state, action, reward, next_state, done):
        self.buffer.append((state, action, reward, next_state, done))
    
    def sample(self, batch_size):
        indices = np.random.choice(len(self.buffer), batch_size, replace=True)
        Batch = namedtuple('Batch', ['states', 'actions', 'rewards', 'next_states', 'dones', 'weights'])
        states = torch.randn(batch_size, *self.state_shape, device=self.device)
        actions = torch.randint(0, 3, (batch_size,), device=self.device)
        rewards = torch.randn(batch_size, device=self.device)
        next_states = torch.randn(batch_size, *self.state_shape, device=self.device)
        dones = torch.zeros(batch_size, device=self.device)
        return Batch(states, actions, rewards, next_states, dones, None)

class LazyPrioritizedMultiStepMemory(LazyMultiStepMemory):
    def __init__(self, capacity, state_shape, device, gamma, multi_step, beta_steps):
        super().__init__(capacity, state_shape, device, gamma, multi_step)
        self.beta_steps = beta_steps
    
    def sample(self, batch_size):
        indices = np.random.choice(len(self.buffer), batch_size, replace=True)
        Batch = namedtuple('Batch', ['states', 'actions', 'rewards', 'next_states', 'dones', 'weights'])
        states = torch.randn(batch_size, *self.state_shape, device=self.device)
        actions = torch.randint(0, 3, (batch_size,), device=self.device)
        rewards = torch.randn(batch_size, device=self.device)
        next_states = torch.randn(batch_size, *self.state_shape, device=self.device)
        dones = torch.zeros(batch_size, device=self.device)
        weights = torch.ones(batch_size, device=self.device)
        return Batch(states, actions, rewards, next_states, dones, weights), weights

class RunningMeanStats:
    def __init__(self, log_size):
        self.log_size = log_size
        self.buffer = deque(maxlen=log_size)
    
    def append(self, x):
        self.buffer.append(x)
    
    def get(self):
        return float(np.mean(self.buffer)) if len(self.buffer) > 0 else 0.0

# Create temporary directory for logs
temp_dir = tempfile.mkdtemp()

ARGS = {
    'env': MockEnv(),
    'test_env': MockEnv(),
    'log_dir': temp_dir,
    'num_steps': 100000,
    'batch_size': 64,
    'memory_size': 1000000,
    'gamma': 0.99,
    'multi_step': 1,
    'sigma': 0.2,
    'start_steps': 20000,
    'update_interval': 4,
    'target_update_interval': 8000,
    'use_per': False,
    'num_eval_steps': 125000,
    'max_episode_steps': 27000,
    'log_interval': 10,
    'eval_interval': 1000,
    'device': 'cpu',
    'seed': 0
}
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 MunchausenACAgent — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MunchausenACAgent 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
QNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("c0deed6c236f0456")
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 an instance of its own class, QNetwork: the run constructed the object and did not call it, so no result was computed. 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 Flatten(nn.Module):
    def forward(self, x):
        return x.view(x.size(0), -1)

def initialize_weights_he(m):
    if isinstance(m, nn.Linear) or isinstance(m, nn.Conv2d):
        torch.nn.init.kaiming_uniform_(m.weight)
        if m.bias is not None:
            torch.nn.init.constant_(m.bias, 0)

class DQNBase(nn.Module):
    def __init__(self, num_channels):
        super(DQNBase, self).__init__()
        self.net = nn.Sequential(
            nn.Conv2d(num_channels, 32, kernel_size=8, stride=4, padding=0),
            nn.ReLU(),
            nn.Conv2d(32, 64, kernel_size=4, stride=2, padding=0),
            nn.ReLU(),
            nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=0),
            nn.ReLU(),
            Flatten()
        ).apply(initialize_weights_he)

    def forward(self, states):
        return self.net(states)

class BaseNetwork(nn.Module):
    def save(self, path):
        torch.save(self.state_dict(), path)

    def load(self, path):
        self.load_state_dict(torch.load(path))

class QNetwork(BaseNetwork):
    def __init__(self, num_channels, num_actions, dueling_net=False):
        super().__init__()
        self.conv = DQNBase(num_channels)
        if not dueling_net:
            self.head = nn.Sequential(
                nn.Linear(7 * 7 * 64, 512),
                nn.ReLU(inplace=True),
                nn.Linear(512, num_actions)
            )
        else:
            self.a_head = nn.Sequential(
                nn.Linear(7 * 7 * 64, 512),
                nn.ReLU(inplace=True),
                nn.Linear(512, num_actions)
            )
            self.v_head = nn.Sequential(
                nn.Linear(7 * 7 * 64, 512),
                nn.ReLU(inplace=True),
                nn.Linear(512, 1)
            )
        self.dueling_net = dueling_net

    def forward(self, states):
        states = self.conv(states)
        if not self.dueling_net:
            return self.head(states)
        else:
            a = self.a_head(states)
            v = self.v_head(states)
            return v + a - a.mean(1, keepdim=True)

ARGS = {
    "num_channels": 4,
    "num_actions": 6,
    "dueling_net": False
}
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 QNetwork — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a QNetwork 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
RunningMeanStats Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("4307d53aa4781ea6")
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 an instance of its own class, RunningMeanStats: the run constructed the object and did not call it, so no result was computed. 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
from collections import deque

class RunningMeanStats:

    def __init__(self, n=10):
        self.n = n
        self.stats = deque(maxlen=n)

    def append(self, x):
        self.stats.append(x)

    def get(self):
        return np.mean(self.stats)


ARGS = {
    "n": 10
}
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 RunningMeanStats — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RunningMeanStats 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
TwinnedQNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("e4242dcaea044cb7")
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 an instance of its own class, TwinnedQNetwork: the run constructed the object and did not call it, so no result was computed. 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 Flatten(nn.Module):
    def forward(self, x):
        return x.view(x.size(0), -1)

def initialize_weights_he(m):
    if isinstance(m, nn.Linear) or isinstance(m, nn.Conv2d):
        torch.nn.init.kaiming_uniform_(m.weight)
        if m.bias is not None:
            torch.nn.init.constant_(m.bias, 0)

class DQNBase(nn.Module):
    def __init__(self, num_channels):
        super(DQNBase, self).__init__()
        self.net = nn.Sequential(
            nn.Conv2d(num_channels, 32, kernel_size=8, stride=4, padding=0),
            nn.ReLU(),
            nn.Conv2d(32, 64, kernel_size=4, stride=2, padding=0),
            nn.ReLU(),
            nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=0),
            nn.ReLU(),
            Flatten()
        ).apply(initialize_weights_he)

    def forward(self, states):
        return self.net(states)

class QNetwork(nn.Module):
    def __init__(self, num_channels, num_actions, dueling_net=False):
        super().__init__()
        self.conv = DQNBase(num_channels)
        if not dueling_net:
            self.head = nn.Sequential(
                nn.Linear(7 * 7 * 64, 512),
                nn.ReLU(inplace=True),
                nn.Linear(512, num_actions)
            )
        else:
            self.a_head = nn.Sequential(
                nn.Linear(7 * 7 * 64, 512),
                nn.ReLU(inplace=True),
                nn.Linear(512, num_actions)
            )
            self.v_head = nn.Sequential(
                nn.Linear(7 * 7 * 64, 512),
                nn.ReLU(inplace=True),
                nn.Linear(512, 1)
            )
        self.dueling_net = dueling_net

    def forward(self, states):
        states = self.conv(states)
        if not self.dueling_net:
            return self.head(states)
        else:
            a = self.a_head(states)
            v = self.v_head(states)
            return v + a - a.mean(1, keepdim=True)

class BaseNetwork(nn.Module):
    def save(self, path):
        torch.save(self.state_dict(), path)

    def load(self, path):
        self.load_state_dict(torch.load(path))

class TwinnedQNetwork(BaseNetwork):
    def __init__(self, num_channels, num_actions, dueling_net=False):
        super().__init__()
        self.Q1 = QNetwork(num_channels, num_actions, dueling_net)
        self.Q2 = QNetwork(num_channels, num_actions, dueling_net)

    def forward(self, states):
        q1 = self.Q1(states)
        q2 = self.Q2(states)
        return (q1, q2)

ARGS = {
    'num_channels': 4,
    'num_actions': 6,
    'dueling_net': False
}
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 TwinnedQNetwork — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TwinnedQNetwork 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
compute_nonparametric_kl_from_normalized_weights Ran
ran, violated the contract we drafted
deepmind/acme/acme/jax/losses/mpo.py
code served (permissive licence) · get_code("26aa15e8de106e8a")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

# Create a small normalized_weights array
# Shape should be (num_action_samples, num_outputs)
# Values should be normalized (sum to 1 along axis 0 or represent valid probabilities)
normalized_weights = jnp.array([
    [0.6, 0.3, 0.2, 0.5],
    [0.4, 0.7, 0.8, 0.5]
], dtype=jnp.float32)

ARGS = {
    "normalized_weights": normalized_weights
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
BaseAgent Not yet run
unverified (harvested, no recorded run)
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("636a9ac9309ad92c")
How it ran

no invocation recorded.

BaseNetwork Not yet run
unverified (harvested, no recorded run)
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("c8be42d3d03f50ae")
How it ran

no invocation recorded.

LazyPrioritizedMultiStepMemory Not yet run
unverified (harvested, no recorded run)
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("cd0a7dde773aaf77")
How it ran

no invocation recorded.

MPO Not yet run
unverified (harvested, no recorded run)
deepmind/acme/acme/jax/losses/mpo.py
code served (permissive licence) · get_code("42136719f9861313")
How it ran

no invocation recorded.

compute_cross_entropy_loss Not yet run
unverified (harvested, no recorded run)
deepmind/acme/acme/jax/losses/mpo.py
code served (permissive licence) · get_code("6e0977288094358f")
How it ran

no invocation recorded.

compute_parametric_kl_penalty_and_dual_loss Not yet run
unverified (harvested, no recorded run)
deepmind/acme/acme/jax/losses/mpo.py
code served (permissive licence) · get_code("fb4ceee742119787")
How it ran

no invocation recorded.

compute_weights_and_temperature_loss Not yet run
unverified (harvested, no recorded run)
deepmind/acme/acme/jax/losses/mpo.py
code served (permissive licence) · get_code("7fa0e09c9f031f21")
How it ran

no invocation recorded.

disable_gradients Not yet run
unverified (harvested, no recorded run)
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("56dd8863f4522252")
How it ran

no invocation recorded.

initialize_weights_he Not yet run
unverified (harvested, no recorded run)
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("2b7b028ed940553c")
How it ran

no invocation recorded.

update_params Not yet run
unverified (harvested, no recorded run)
lingweizhu/Pytorch-MunchausenActorCritic/Munchausen_actorcritic_discrete/agent/munchausen_ac.py
code served (permissive licence) · get_code("33523284389291bf")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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
BaseNetwork
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1801.01290 (2018-01)
Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor
LazyMemory
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1511.05952 (2015-11)
Prioritized Experience Replay
LazyMultiStepMemory
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1511.05952 (2015-11)
Prioritized Experience Replay
LazyPrioritizedMultiStepMemory
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1511.05952 (2015-11)
Prioritized Experience Replay
MultiStepBuff
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1511.05952 (2015-11)
Prioritized Experience Replay
disable_gradients
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1801.01290 (2018-01)
Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor
update_params
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1801.01290 (2018-01)
Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor

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

Bootstrapping is a core mechanism in Reinforcement Learning (RL). Most algorithms, based on temporal differences, replace the true value of a transiting state by their current estimate of this value. Yet, another estimate could be leveraged to bootstrap RL: the current policy. Our core contribution stands in a very simple idea: adding the scaled log-policy to the immediate reward. We show that slightly modifying Deep Q-Network (DQN) in that way provides an agent that is competitive with distributional methods on Atari games, without making use of distributional RL, n-step returns or prioritized replay. To demonstrate the versatility of this idea, we also use it together with an Implicit Quantile Network (IQN). The resulting agent outperforms Rainbow on Atari, installing a new State of the Art with very little modifications to the original algorithm. To add to this empirical study, we provide strong theoretical insights on what happens under the hood -implicit Kullback-Leibler regularization and increase of the action-gap.

For agents

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

get_harvested_code_for_paper("2007.14430")
get_code_for_paper("2007.14430")
have("2007.14430")

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

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

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

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

Connect an agent — have() is free.