Skip to content

feat(rl): add renewable strategy compatible with shared MATD3 critics - #811

Open
isaac-gumbrell wants to merge 4 commits into
assume-framework:mainfrom
isaac-gumbrell:pr/renewable-learning-compatible
Open

feat(rl): add renewable strategy compatible with shared MATD3 critics#811
isaac-gumbrell wants to merge 4 commits into
assume-framework:mainfrom
isaac-gumbrell:pr/renewable-learning-compatible

Conversation

@isaac-gumbrell

Copy link
Copy Markdown
Contributor

Description

This PR adds a renewable learning strategy that is compatible with the observation dimensions used by the existing generator and storage learning strategies.

The main motivation is mixed-agent RL training. The new strategy keeps renewable units dimension-compatible with the other learning agents so they can share a centralized MATD3 critic. In addition, it adjusts the renewable-specific bidding and reward logic to avoid pathological floor-seeking behaviour and persistent negative-price bidding which result in negative prices.

Changes in this PR:

  • add RenewableEnergyLearningCompatibleStrategy
  • align renewable observation dimensions with the generator and storage learning strategies
  • keep the strategy compatible with shared centralized-critic MATD3 training
  • remap the renewable action space to a non-negative bid range
  • remove renewable regret handling that was encouraging race-to-the-bottom bidding
  • document the new strategy in the bidding-strategies docs

Checklist

  • Documentation updated (docstrings, READMEs, user guides, inline comments, doc folder updates etc.)
  • New unit/integration tests added (if applicable)
  • Changes noted in release notes (if any)
  • Consent to release this PR's code under the GNU Affero General Public License v3.0

Gumbrell, Isaac added 3 commits May 25, 2026 11:09
… bias

RenewableEnergyLearningCompatibleStrategy changes:
- Override calculate_bids: remap [-1,1] to [0, max_bid_price] to prevent
  negative bids that are meaningless for near-zero marginal cost renewables
- Override get_actions: bypass EnergyLearningStrategy marginal cost
  exploration bias by calling TorchLearningStrategy directly, since
  marginal cost was removed from this strategy's observation space
- Remove regret term from calculate_reward: near-zero marginal cost
  collapses the opportunity cost formula into a one-directional incentive
  to bid at the floor; profit-only reward provides correct signal
@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 10.76923% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.01%. Comparing base (c330ab5) to head (a05c6bc).

Files with missing lines Patch % Lines
assume/strategies/learning_strategies.py 9.37% 58 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #811      +/-   ##
==========================================
- Coverage   80.51%   80.01%   -0.50%     
==========================================
  Files          56       56              
  Lines        9056     9121      +65     
==========================================
+ Hits         7291     7298       +7     
- Misses       1765     1823      +58     
Flag Coverage Δ
pytest 80.01% <10.76%> (-0.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kim-mskw
kim-mskw self-requested a review May 27, 2026 08:39
…n compatibility

RenewableEnergyLearningCompatibleStrategy.__init__ unconditionally discarded any caller-provided unique_obs_dim and forced it to 2. When wrapped by _CongestionObsMixin (which inflates unique_obs_dim to 2 + n_lines * congestion_foresight so the centralised critic computes obs_dim correctly), this reset caused the renewable-compatible congestion variant to report obs_dim=74 while sibling generator/storage congestion strategies reported 121, tripping the all-equal check in MATD3.check_strategy_dimensions.

Default to 2 but accept overrides from kwargs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant