Repository navigation
Use LoopAlgorithm's experiments, and add Guard + Runway - #2608
Merged
Merged
Conversation
LoopAlgorithm now implements the algorithm experiments (LoopKit/LoopAlgorithm#10). Pass the enabled set and the volatility baseline in the algorithm input instead of computing the glucose-based application factor and switching integral RC in Loop. The removed application factor strategies matched LoopAlgorithm's factor exactly. Guard + Runway gets a row in Algorithm Experiments. Its volatility baseline is the median sigma5 over four weeks of glucose, refreshed daily (hourly until there is a day of glucose). Dosing decisions record each experiment by its LoopAlgorithm name, with the baseline for guard + runway, and the diagnostic report lists both. LoopKit also declares an AlgorithmExperiment, so LoopAlgorithm's is referred to through the LoopAlgorithmExperiment typealias.
LoopAlgorithm renamed its experiment type, so the LoopAlgorithmExperiment typealias and the LoopKit.AlgorithmExperiment qualifications are no longer needed.
AndEliRich
pushed a commit
to AndEliRich/LoopWorkspace
that referenced
this pull request
Oct 24, 2026
…t, welcome screen width - LoopAlgorithm: optional algorithm experiments (LoopKit/LoopAlgorithm#10), type renamed to ExperimentOption (LoopKit/LoopAlgorithm#11) - Loop: use LoopAlgorithm's experiments, and add Guard + Runway (LoopKit/Loop#2608) - LoopOnboarding: limit the welcome screen to a readable width (LoopKit/LoopOnboarding#39)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LoopKit/LoopAlgorithm#10 moved the algorithm experiments into LoopAlgorithm and added a new one,
guardAndRunway. This switches Loop over to them and adds a setting for the new one.fetchDatapasses the enabled set (experiments) andvolatilityBaseline. Integral RC and Glucose Based Partial Application now run through LoopAlgorithm, so the app-side application factor strategies are removed; their math was identical to LoopAlgorithm's.GlucoseVolatility.baseline(_:). It is refreshed once a day, or hourly until there is a day of glucose; until then the algorithm uses the band at full depth.ExperimentOption(Rename AlgorithmExperiment to ExperimentOption LoopAlgorithm#11), so it doesn't clash with LoopKit'sAlgorithmExperimentrecord.Needs LoopKit/LoopAlgorithm#11 (the rename); the LoopWorkspace bump will follow once both merge.
Tested: Loop builds against LoopAlgorithm with #11 and stock LoopKit next-dev; LoopTests (344) and LoopKitTests (507) pass. Not yet run in the simulator with the experiment switched on.