TrajectoryStoreConfiguration
Retention-side configuration for one trajectory store.
Methods
validate_archive
validate_archive() -> TrajectoryStoreConfigurationValues
archive_group_field
archive_group_field: str | None = NoneOptional recorded cell field (read from each route's start cell, for example "cavern") to partition the best-route archive by. When set, archive_size is kept PER distinct value, so archive_size=1 keeps one best route per cavern instead of one globally — essential for multi-cavern BC so n=1 does not clone a single level. None => one global archive (original behaviour). The field must be a recorded value present in each route's start cell (add it to the recording keys / aliases).
archive_priority_utility
archive_priority_utility: str | None = NoneName of the backpropagated route-quality utility whose value ranks routes in the archive. Required when archive_size > 0. Point it at a utility whose win terminal reward is large so wins dominate; for win-less games use a plain route_quality utility and the identical code path applies.
archive_size
archive_size: int = Field(default=0, ge=0)Number of best full routes to keep in the side best-route archive (0 disables it). The archive holds its own whole-path references ranked by a route-level priority score, independently of the per-cell retention buckets, so the best full routes survive bucket churn for sub-segment BC. A win is just a huge value in that score, so winning routes sort to the top when the game has them and the mechanism is identical for games with no win signal (priority then = the plain route-quality score).
archive_win_tiebreak_field
archive_win_tiebreak_field: str | None = NoneOptional recorded end_values field (for example "air_supply", higher = better) used to break ties BETWEEN winning routes in the archive. Winning routes all share the exit cell's backpropagated utility value, so ranking by the priority utility alone ties them and an arbitrary win keeps the slot. With this set, wins rank by the route's OWN terminal value of this field, so a faster win (more air left) displaces a slower one ending at the same cell. None => wins tie-break on the priority utility (original behaviour). Only affects ordering among wins; losing routes always rank by the priority utility.
group_by
group_by: list[str] | None = Nonekey_source
key_source: TrajectoryKeySource = 'metadata'max_per_key
max_per_key: int = Field(default=10, gt=0)retention
retention: TrajectoryStoreRetentionConfiguration = Field(default_factory=TrajectoryStoreRetentionConfiguration)