View source: R/decision_points.R
| TrajectoryRecord | R Documentation |
Engine-owned audit record emitted at each decision point when a
TrajectoryLogger is configured. This is the canonical surface for policy
evaluation, audit, and RL reward computation.
TrajectoryRecord(
run_id,
entity_id,
t,
decision_point_id,
observation,
realized_event,
candidate_actions = NULL,
proposed_actions = NULL,
selected_action = NULL,
state_before = NULL,
state_after = NULL,
condition_met = NULL,
reward = NULL,
grouped_decision_point_id = NULL,
group_activation_id = NULL,
decision_plan_metadata = NULL
)
run_id |
Character scalar; run identifier (from |
entity_id |
Character scalar; entity identifier. |
t |
Numeric scalar; time at which the decision point fired. |
decision_point_id |
Character scalar; which decision point produced this record. |
observation |
Named list; output of the decision point's
|
realized_event |
The event record that triggered the decision point. |
candidate_actions |
Optional character vector of actions presented to the policy. |
proposed_actions |
Optional list of actions proposed by the policy. |
selected_action |
Optional |
state_before |
Optional named list; entity state before the event.
|
state_after |
Optional named list; entity state after the transition.
|
condition_met |
Logical scalar or |
reward |
Optional numeric or named list; reward signal(s). |
grouped_decision_point_id |
Optional non-empty character scalar naming
the grouped decision point that activated this leaf. Must be supplied with
|
group_activation_id |
Optional non-empty character scalar identifying
one grouped firing within a run. Must be supplied with
|
decision_plan_metadata |
Optional named list copied from the accepted
|
state_before and state_after are NULL by default. Supply a
summary_fn to the TrajectoryLogger to enable summary-level or full capture.
Consult the entity's event history to determine which selected actions
actually realized. For example, a later policy selection can be discarded
when its decision point uses on_pending_action = "keep" and an earlier
action is still pending.
Grouped leaf records carry the static group id and one deterministic,
run-local activation id shared by every emitted leaf row from that firing.
Ordinary records leave both fields NULL. These fields correlate the
grouped consultation; they do not provide proposal-to-realization lineage.
decision_plan_metadata is copied unchanged for raw audit and is intentionally
omitted from trajectory_table().
A list of class "TrajectoryRecord".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.