SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2001.00735 · 2020

Trajectory Forecasts in Unknown Environments Conditioned on Grid-Based Plans

arXiv · PDF · Open in the Atlas

Code that ran

3 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; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-21; 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/2001.00735.json · badge: /api/ran/2001.00735.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
nachiket92/P2T canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
forward Ran
ran on a synthesized input
nachiket92/P2T/models/rl.py
code served (permissive licence) · get_code("682763c80dfee513")
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, 24) as a later run recorded it. 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, 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 math

torch.manual_seed(0)

# Define the helper function and MDP class
def trc2id(t, row, col, grid_dim):
    """
    Convert row, col, cell type to state id
    """
    s_id = (t * grid_dim[0] * grid_dim[1] + row * grid_dim[1] + col) // 1
    return s_id

class MDP(object):

    def __init__(self, grid_dim, horizon=40, gamma=0.99, actions=4):
        self.horizon = horizon
        self.gamma = gamma
        if actions == 4:
            self.actions = [(1, 0, 0), (0, 1, 0), (-1, 0, 0), (0, -1, 0), (0, 0, 1)]
        else:
            self.actions = [(1, 0, 0), (0, 1, 0), (-1, 0, 0), (0, -1, 0), (1, 1, 0), (-1, 1, 0), (1, -1, 0), (-1, -1, 0), (0, 0, 1)]
        self.grid_dim = grid_dim
        s_next, s_next_inv, s_prev, s_prev_inv = self.get_transition_table()
        self.s_next = s_next
        self.s_next_inv = s_next_inv
        self.s_prev = s_prev
        self.s_prev_inv = s_prev_inv
        self.s_next.requires_grad = False
        self.s_next_inv.requires_grad = False
        self.s_prev.requires_grad = False
        self.s_prev_inv.requires_grad = False

    def get_transition_table(self):
        """
        Returns look up tables for next state and previous state for a state-action pair. Additionally returns
        look up tables with invalid flags for invalid transitions
        """
        s_next = torch.zeros((len(self.actions), 2 * self.grid_dim[0] * self.grid_dim[1])).long()
        s_prev = torch.zeros((len(self.actions), 2 * self.grid_dim[0] * self.grid_dim[1])).long()
        s_next_inv = torch.zeros((len(self.actions), 2 * self.grid_dim[0] * self.grid_dim[1]))
        s_prev_inv = torch.ones((len(self.actions), 2 * self.grid_dim[0] * self.grid_dim[1]))
        for t in range(2):
            for m in range(self.grid_dim[0]):
                for n in range(self.grid_dim[1]):
                    for k in range(len(self.actions)):
                        s_type = self.actions[k][2]
                        row = m + self.actions[k][0]
                        col = n + self.actions[k][1]
                        orig_id = trc2id(t, m, n, self.grid_dim)
                        if 0 <= row < self.grid_dim[0] and 0 <= col < self.grid_dim[1] and (t == 0):
                            next_id = trc2id(s_type, row, col, self.grid_dim)
                            s_next[k, orig_id] = int(next_id)
                        else:
                            s_next_inv[k, orig_id] = -math.inf
        for t in range(2):
            for m in range(self.grid_dim[0]):
                for n in range(self.grid_dim[1]):
                    for k in range(len(self.actions)):
                        s_type = t - self.actions[k][2]
                        row = m - self.actions[k][0]
                        col = n - self.actions[k][1]
                        orig_id = trc2id(t, m, n, self.grid_dim)
                        if s_type == 0 and 0 <= row < self.grid_dim[0] and (0 <= col < self.grid_dim[1]):
                            prev_id = trc2id(s_type, row, col, self.grid_dim)
                            s_prev[k, orig_id] = int(prev_id)
                        else:
                            s_prev_inv[k, orig_id] = 0
        return (s_next, s_next_inv, s_prev, s_prev_inv)

# Create MDP with small grid
grid_dim = (3, 4)
mdp = MDP(grid_dim=grid_dim, horizon=5, gamma=0.99, actions=4)

# Create policy tensor
# shape [batch_size, horizon, num_actions, num_states]
batch_size = 2
horizon = 5
num_actions = len(mdp.actions)
num_states = 2 * grid_dim[0] * grid_dim[1]

pi = torch.randn(batch_size, horizon, num_actions, num_states)
pi = torch.softmax(pi, dim=2)  # Make it a valid policy

# Create initial state
initial_state = (1, 2)

ARGS = {
    "mdp": mdp,
    "pi": pi,
    "initial_state": initial_state
}
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 Tensor, ndim 2, dtype family float, shape (2, 24) — shape (2, 24) 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
get_plan_feats Ran
ran on a synthesized input
nachiket92/P2T/utils.py
code served (permissive licence) · get_code("41283b80fdec4071")
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 torch

torch.manual_seed(0)

# Batch size: 2
# Horizon: 5
# Scene channels: 3
# Agent channels: 4
# Grid height/width: 8 (so H=W=8, total spatial dims = 64)

batch_size = 2
horizon = 5
c_s = 3  # scene channels
c_a = 4  # agent channels
h = 8
w = 8

# plans: (Batchsize, horizon, 2) - row and column indices on grid
plans = torch.randint(0, h, (batch_size, horizon, 2), dtype=torch.long)

# scene_tensor: (Batchsize, C_s, H, W)
scene_tensor = torch.randn(batch_size, c_s, h, w)

# agent_tensor: (Batchsize, C_a, H, W)
agent_tensor = torch.randn(batch_size, c_a, h, w)

ARGS = {
    "plans": plans,
    "scene_tensor": scene_tensor,
    "agent_tensor": agent_tensor,
}
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 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
min_ade_k Ran
ran on a synthesized input
nachiket92/P2T/utils.py
code served (permissive licence) · get_code("2a0643fbace6f96c")
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 0, dtype family float, shape () 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

torch.manual_seed(0)

# Parameters for min_ade_k function
batch_size = 2
max_k = 4
prediction_horizon = 3
coordinate_dim = 2

# y_pred: (Batchsize, maxK, prediction horizon, 2)
y_pred = torch.randn(batch_size, max_k, prediction_horizon, coordinate_dim)

# y_gt: (Batchsize, prediction horizon, 2)
y_gt = torch.randn(batch_size, prediction_horizon, coordinate_dim)

# masks: (Batchsize, maxK) with 0 or inf values
# Using 0 for valid predictions and float('inf') for invalid ones
masks = torch.zeros(batch_size, max_k)
masks[0, 2:] = float('inf')  # First sample has only 2 valid predictions
masks[1, 3:] = float('inf')  # Second sample has only 3 valid predictions

ARGS = {
    'y_pred': y_pred,
    'y_gt': y_gt,
    'masks': masks
}
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 Tensor, ndim 0, dtype family float, shape () — shape () 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
backward Not yet run
unverified (harvested, no recorded run)
nachiket92/P2T/models/rl.py
code served (permissive licence) · get_code("fae544a3b40bd205")
How it ran

no invocation recorded.

init_conv_layers Not yet run
unverified (harvested, no recorded run)
nachiket92/P2T/models/reward_model.py
code served (permissive licence) · get_code("97ece7d8684d5a99")
How it ran

no invocation recorded.

solve Not yet run
unverified (harvested, no recorded run)
nachiket92/P2T/models/rl.py
code served (permissive licence) · get_code("acccec4f3a55e83b")
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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We address the problem of forecasting pedestrian and vehicle trajectories in unknown environments, conditioned on their past motion and scene structure. Trajectory forecasting is a challenging problem due to the large variation in scene structure and the multimodal distribution of future trajectories. Unlike prior approaches that directly learn one-to-many mappings from observed context to multiple future trajectories, we propose to condition trajectory forecasts on plans sampled from a grid based policy learned using maximum entropy inverse reinforcement learning (MaxEnt IRL). We reformulate MaxEnt IRL to allow the policy to jointly infer plausible agent goals, and paths to those goals on a coarse 2-D grid defined over the scene. We propose an attention based trajectory generator that generates continuous valued future trajectories conditioned on state sequences sampled from the MaxEnt policy. Quantitative and qualitative evaluation on the publicly available Stanford drone and NuScenes datasets shows that our model generates trajectories that are diverse, representing the multimodal predictive distribution, and precise, conforming to the underlying scene structure over long prediction horizons.

For agents

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

get_harvested_code_for_paper("2001.00735")
get_code_for_paper("2001.00735")
have("2001.00735")

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

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

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

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

Connect an agent — have() is free.