Skip to content

Add tick-based time unit and segmented RLE plan encoding support#69

Open
joonyeol-sim wants to merge 1 commit intodevfrom
Support2026Startkit
Open

Add tick-based time unit and segmented RLE plan encoding support#69
joonyeol-sim wants to merge 1 commit intodevfrom
Support2026Startkit

Conversation

@joonyeol-sim
Copy link
Contributor

Summary

  • Add support for tick-based time units (planEncoding.timeUnit: "tick") with fractional state transitions, enabling finer-grained animation for 2026 Startkit compatibility
  • Implement segmented RLE action decoding (actualPlanSegments / plannerPlanSegments) as a new compact plan format alongside the existing comma-separated legacy paths
  • Add tick and timestep display labels in the GUI with synchronized timeline updates
  • Support fractional orientations in get_angle, get_dir_loc, and get_rotation for smooth intermediate tick rendering

Related Isseus #68

@joonyeol-sim joonyeol-sim self-assigned this Feb 24, 2026
@joonyeol-sim joonyeol-sim added the Q1 (Urgent + Important) Handle immediately / Do now label Feb 24, 2026
@joonyeol-sim joonyeol-sim force-pushed the Support2026Startkit branch from 94979b7 to 5678944 Compare March 1, 2026 06:46
- Extract `decode_segmented_rle_string_path()` as instance method from nested function
- Move method definition above `extract_agent_actions()` for logical ordering
- Update call site to use `self.decode_segmented_rle_string_path()`
- No functional changes to decoding logic or validation

Refactor segmented RLE decoding to support inline string format in path fields

- Replace `decode_segmented_rle_actions()` with `extract_agent_actions()` that handles both segmented-rle-v1 string chunks and legacy comma-separated motions
- Add `decode_segmented_rle_string_path()` to parse inline format: `[(startTick,x,y,dir,counter):(action ticks,...)]`
- Remove support for separate `actualPlanSegments`/`plannerPlanSegments` fields; decode directly from path strings
- Validate chunk contiguity, state field count, and run format in string-based RLE paths
- Simplify caller code by consolidating action extraction into single method

Support compact format for segmented RLE action encoding

- Add compact format: agent-indexed list with [start_state_with_tick, tick_actions] entries
- Extract `decode_tick_actions_list()` helper to decode RLE runs shared by both formats
- Support 'tick_actions' field name in legacy format (fallback to 'runs')
- Validate contiguous tick sequences and start states in compact format
- Handle JSON-encoded start_state_with_tick arrays in compact format

Add tick and timestep display labels with timeline synchronization

- Add separate tick label UI element above timestep label
- Implement `set_time_labels()` to compute and update both tick and timestep values based on timeline position
- Replace hardcoded `self.pcf.moves` with `animation_substeps` in forward/backward animation loops
- Update timeline slider callback to synchronize both labels via `set_time_labels()`
- Adjust animation delay based on time unit (single delay for tick-based, double for timestep-based)

Add tick-based time unit support with segmented RLE action decoding

- Add `timeUnit`, `ticksPerTimestep`, and `animationSubsteps` configuration fields
- Implement `decode_segmented_rle_actions()` to parse RLE-encoded action segments with tick granularity
- Add `transition_state()` for fractional state transitions within timesteps
- Extract actions using new `extract_agent_actions()` with fallback to legacy comma-separated paths
- Support `makespanTicks` field and adjust animation delay for tick-based plans
- Apply tick-based transitions when rendering actual and planner paths

Add support for fractional orientations in angle and direction calculations

- Extend `get_angle()` to handle non-integer directions using linear interpolation
- Update `get_dir_loc()` to calculate directional indicator positions for fractional orientations using trigonometry
- Modify `get_rotate()` to compute rotation deltas for fractional directions
@joonyeol-sim joonyeol-sim force-pushed the Support2026Startkit branch from 70a02c9 to 73ac8a1 Compare March 1, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Q1 (Urgent + Important) Handle immediately / Do now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant