SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2111.05969 · 2021

PowerGridworld: A Framework for Multi-Agent Reinforcement Learning in Power Systems

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 0 no recorded run), measured 2026-11-23; 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/2111.05969.json · badge: /api/ran/2111.05969.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
nrel/powergridworld canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
build_u_vector Ran
ran on a synthesized input
nrel/powergridworld/gridworld/agents/buildings/five_zone_rom_dynamics.py
code served (permissive licence) · get_code("c6fc339cd36db94d")
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 (5, 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 numpy as np

Z = 5

# Build the models dict with required structure
# Each model needs 'neighbors' list and 'input_sel_list'
models = {}
for z in range(Z):
    # neighbors: list of zone indices that are neighbors to zone z
    neighbors = [(z + 1) % Z, (z - 1) % Z]
    # input_sel_list: list containing a list of indices (1-indexed) into u_pos
    # u_pos has shape (Z, 8), so valid indices are 1-8
    # We need at most 4 selections since u output is (Z, 4)
    input_sel_list = [[1, 2, 3, 4]]  # Select first 4 columns from u_pos
    
    models[z] = {
        'neighbors': neighbors,
        'input_sel_list': input_sel_list
    }

# Build input arrays
zone_temp = np.array([20.0, 21.0, 19.5, 22.0, 20.5], dtype=np.float64)  # Temperature for each zone
action = np.array([0.5, 0.6, 0.55, 0.65, 0.58, 25.0], dtype=np.float64)  # 5 action values + 1 setpoint temp
temp_oa = np.array(15.0, dtype=np.float64)  # Outdoor air temperature (scalar)
q_solar = np.array([100.0, 110.0, 105.0, 115.0, 108.0], dtype=np.float64)  # Solar heat gain per zone
q_int = np.array([50.0, 55.0, 52.0, 60.0, 51.0], dtype=np.float64)  # Internal heat gain per zone
q_cool = np.array([10.0, 12.0, 11.0, 13.0, 10.5], dtype=np.float64)  # Cooling per zone

ARGS = {
    'models': models,
    'zone_temp': zone_temp,
    'action': action,
    'temp_oa': temp_oa,
    'q_solar': q_solar,
    'q_int': q_int,
    'q_cool': q_cool
}
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 ndarray, ndim 2, dtype family float, shape (5, 4) — shape (5, 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
filter_update Ran
ran on a synthesized input
nrel/powergridworld/gridworld/agents/buildings/five_zone_rom_dynamics.py
code served (permissive licence) · get_code("b347b79a7945ed01")
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 numpy as np

Z = 5

# Build the models dict structure
# Each model needs: 'x_k', 'ss_A', 'ss_B', 'ss_C', 'ss_K', 'mean_output'
models = {}
for z in range(Z):
    models[z] = {
        'x_k': np.array([1.5]),  # scalar state
        'ss_A': np.array([[0.9]]),  # 1x1 system matrix
        'ss_B': np.array([[0.5, 0.3, 0.2, 0.1]]),  # 1x4 input matrix
        'ss_C': np.array([[0.8]]),  # 1x1 output matrix
        'ss_K': np.array([[0.2]]),  # 1x1 Kalman gain
        'mean_output': 20.0  # scalar mean
    }

# zone_temp: measurement for each zone (Z=5 zones)
zone_temp = np.array([22.1, 21.5, 23.2, 20.8, 21.9])

# u: control input vector with shape (Z, 4)
u = np.random.randn(Z, 4).astype(np.float32)

ARGS = {
    'models': models,
    'zone_temp': zone_temp,
    'u': u
}
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 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
maybe_rescale_box_space Ran
ran on a synthesized input
nrel/powergridworld/gridworld/utils.py
code served (permissive licence) · get_code("82ac0a132efa914d")
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 Box. 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 gymnasium as gym
import numpy as np

# Create a Box space with shape (4, 3) and dtype float32
box_space = gym.spaces.Box(
    low=-10.0,
    high=10.0,
    shape=(4, 3),
    dtype=np.float32
)

ARGS = {
    "box": box_space,
    "rescale": True
}
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 Box — a Box output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Box 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
state_update Ran
ran on a synthesized input
nrel/powergridworld/gridworld/agents/buildings/five_zone_rom_dynamics.py
code served (permissive licence) · get_code("968c10d6f0d719c4")
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 numpy as np

Z = 5

# Construct the models dict
# Each model needs:
# - 'x_k': current state (scalar or array)
# - 'ss_A': state matrix A (will be squeezed)
# - 'ss_B': state matrix B (will be reshaped to 1 x num_inputs)

models = {}
for z in range(Z):
    models[z] = {
        'x_k': np.array([1.5]),  # scalar state
        'ss_A': np.array([[0.9]]),  # 1x1 matrix, will be squeezed
        'ss_B': np.array([[0.5, 0.3, 0.2, 0.1]]),  # 1x4 input matrix
    }

# Construct u: shape (Z, num_inputs) = (5, 4)
u = np.random.randn(Z, 4).astype(np.float32)

ARGS = {
    'models': models,
    'u': u,
}
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 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

Also present in other papers' code

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

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-23.

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 present the PowerGridworld software package to provide users with a lightweight, modular, and customizable framework for creating power-systems-focused, multi-agent Gym environments that readily integrate with existing training frameworks for reinforcement learning (RL). Although many frameworks exist for training multi-agent RL (MARL) policies, none can rapidly prototype and develop the environments themselves, especially in the context of heterogeneous (composite, multi-device) power systems where power flow solutions are required to define grid-level variables and costs. PowerGridworld is an open-source software package that helps to fill this gap. To highlight PowerGridworld's key features, we present two case studies and demonstrate learning MARL policies using both OpenAI's multi-agent deep deterministic policy gradient (MADDPG) and RLLib's proximal policy optimization (PPO) algorithms. In both cases, at least some subset of agents incorporates elements of the power flow solution at each time step as part of their reward (negative cost) structures.

For agents

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

get_harvested_code_for_paper("2111.05969")
get_code_for_paper("2111.05969")
have("2111.05969")

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

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

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

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

Connect an agent — have() is free.