Repository navigation
Implement configurable penalty decay and regressive scoring tests - #23
Open
google-labs-jules[bot] wants to merge 1 commit into
Open
google-labs-jules[bot] wants to merge 1 commit into
google-labs-jules[bot] wants to merge 1 commit into
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-thresholdand--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) and2.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.jsto the spawneddesign-simulator.jsprocess. Additionally, the spatial collision scoring system remains completely untouched.Key Changes
--decay-thresholdand--decay-multiplierconfiguration arguments.design-mcts.jsto forward runtime configuration arguments directly to the spawneddesign-simulator.jssubprocess.test-decay-regression.jswhich: