pub struct EgriLoop<A, P, X, E, S>where
A: Clone,
P: Proposer<Artifact = A>,
X: Executor<Artifact = A>,
E: Evaluator<Artifact = A>,
S: Selector,{ /* private fields */ }Expand description
The EGRI loop engine — orchestrates the full recursive improvement cycle.
Π = (X, M, H, E, J, C, B, P, L)
while budget remains:
m = propose(x_t, L)
x' = apply(m, x_t)
result = execute(x')
outcome = evaluate(x', result)
decision = select(outcome, best)
apply_decision(decision, x')
append(L, trial_record)Implementations§
Source§impl<A, P, X, E, S> EgriLoop<A, P, X, E, S>
impl<A, P, X, E, S> EgriLoop<A, P, X, E, S>
pub fn new( proposer: P, executor: X, evaluator: E, selector: S, budget: BudgetController, ledger: Ledger, ) -> Self
Sourcepub fn baseline(&mut self, artifact: A) -> Result<Outcome>
pub fn baseline(&mut self, artifact: A) -> Result<Outcome>
Establish the baseline. Must be called before run.
Sourcepub fn step(&mut self) -> Result<TrialRecord>
pub fn step(&mut self) -> Result<TrialRecord>
Run a single trial. Returns the trial record.
Sourcepub fn run(&mut self) -> Result<LoopSummary>
pub fn run(&mut self) -> Result<LoopSummary>
Run the full loop until budget is exhausted or an escalation occurs.
Sourcepub fn summary(&self) -> LoopSummary
pub fn summary(&self) -> LoopSummary
Get current loop summary.
Auto Trait Implementations§
impl<A, P, X, E, S> Freeze for EgriLoop<A, P, X, E, S>
impl<A, P, X, E, S> RefUnwindSafe for EgriLoop<A, P, X, E, S>
impl<A, P, X, E, S> Send for EgriLoop<A, P, X, E, S>
impl<A, P, X, E, S> Sync for EgriLoop<A, P, X, E, S>
impl<A, P, X, E, S> Unpin for EgriLoop<A, P, X, E, S>
impl<A, P, X, E, S> UnsafeUnpin for EgriLoop<A, P, X, E, S>
impl<A, P, X, E, S> UnwindSafe for EgriLoop<A, P, X, E, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more