Skip to main content

DiscountHorizonScenario

Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/learning.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

One rollout of decisions step apart under discount discount: how far the return reaches, in decisions and in seconds, and the discount that keeps retained_weight of the final reward at the first decision.

Notes

Equation: Terminal weight=discount**decisions; effective horizon=1/(1-discount); time horizon=steps*step.

Assumptions: A fixed decision period and stationary geometric discount in its valid range.

Excludes: Policy quality or a causal memory horizon implied by the discount alone.

References

Implementation references: mlsysim.physics.robotics.learning.calc_discount_effective_horizon, mlsysim.physics.robotics.learning.calc_discount_for_retained_weight, mlsysim.physics.robotics.learning.calc_discounted_weight. These helper contracts state the source assumptions; the scenario binds their inputs and derives the displayed ratios and budgets.

Examples

The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.LatchOpeningDiscount
>>> scenario.decisions
320

Attributes

Name Description
decisions Number of decision intervals in a rollout, rounding rollout duration divided by step duration.
discount
horizon_steps Geometric effective horizon in decisions from calc_discount_effective_horizon; assumes a stationary discount.
horizon_time Effective discounted horizon in seconds: horizon steps times decision period.
retained_weight
retaining_discount Discount required to retain the declared terminal weight over the decision horizon, via calc_discount_for_retained_weight.
rollout
step
terminal_weight Discount weight of the final decision via calc_discounted_weight; equals discount raised to the decision count.

step

Type: Quantity.

Declared default: required.

rollout

Type: Quantity.

Declared default: required.

discount

Type: float.

Declared default: required.

retained_weight

Type: float.

Declared default: 0.5.

decisions

engine.scenario_types.DiscountHorizonScenario.decisions

Number of decision intervals in a rollout, rounding rollout duration divided by step duration.

Equation: int(round((self.rollout / self.step).to(’’).magnitude))

terminal_weight

engine.scenario_types.DiscountHorizonScenario.terminal_weight

Discount weight of the final decision via calc_discounted_weight; equals discount raised to the decision count.

Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.

horizon_steps

engine.scenario_types.DiscountHorizonScenario.horizon_steps

Geometric effective horizon in decisions from calc_discount_effective_horizon; assumes a stationary discount.

Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.

horizon_time

engine.scenario_types.DiscountHorizonScenario.horizon_time

Effective discounted horizon in seconds: horizon steps times decision period.

Equation: (self.horizon_steps * self.step).to(‘second’)

retaining_discount

engine.scenario_types.DiscountHorizonScenario.retaining_discount

Discount required to retain the declared terminal weight over the decision horizon, via calc_discount_for_retained_weight.

Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.

Back to top