Skip to content

Implement configurable penalty decay and regressive scoring tests - #23

Open
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
jules/configurable-decay-testing-js1-91153ec0-6558-4662-b0cd-7caaf488ccb1
Open

google-labs-jules[bot] wants to merge 1 commit into
mainfrom
jules/configurable-decay-testing-js1-91153ec0-6558-4662-b0cd-7caaf488ccb1

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

Summary

This pull request introduces configurable penalty decay parameters for the layout design simulator and establishes a regressive test suite to protect the scoring landscape from linear flatlining. By allowing layout engineering teams to tune these decay parameters dynamically, we resolve convergence bottlenecks during search tree execution across varying layout sizes.

Rationale & Key Decisions

1. Decoupling Tuning Parameters from Simulator Core

Previously, the logarithmic penalty decay threshold and scaling multiplier were hardcoded. This approach prevented layout engineers from optimizing search performance for larger or more complex canvas templates. Exposing these values via runtime command-line flags (--decay-threshold and --decay-multiplier) allows dynamic tuning without risking core simulator codebase drift.

2. Maintaining Strict Fallback Defaults

To ensure backward compatibility and prevent immediate disruptions to existing search behaviors, the simulator falls back to the original logarithmic formula values of exactly 80 (threshold) and 2.5 (multiplier) when arguments are omitted.

3. Protecting the Search Gradient via Regressive Testing

The node selection algorithm (MCTS) relies heavily on a logarithmic scoring gradient to make decisions under multi-penalty scenarios. If code changes accidentally degrade this gradient into a linear drop or cause it to flatline, search tree convergence breaks down. The new regression suite actively verifies that the scoring curvature remains strictly non-linear and fails the build if flatlining behavior is detected.

4. Architectural Boundaries

In accordance with system constraints, we avoided any architectural changes to the external process spawning model. The parameters are passed cleanly from design-mcts.js to the spawned design-simulator.js process. Additionally, the spatial collision scoring system remains completely untouched.


Key Changes

  • Runtime Parameterization: Added support for --decay-threshold and --decay-multiplier configuration arguments.
  • MCTS & Simulator Interop: Updated design-mcts.js to forward runtime configuration arguments directly to the spawned design-simulator.js subprocess.
  • Regressive Test Suite: Implemented test-decay-regression.js which:
    • Asserts that score evaluations remain non-linear for multi-penalty scenarios.
    • Ensures the penalty curve maintains a logarithmic curvature.
    • Fails immediately if the scoring curve drops to zero linearly.

- Expose decay threshold and multiplier parameters in design-simulator.js
- Pass decay settings from design-mcts.js to simulator
- Add test-decay-regression.js to enforce non-linear logarithmic decay
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.

0 participants