Skip to content

Bugfix/watch knn - #61

Merged
Kristofferjoha merged 3 commits into
mainfrom
bugfix/watch_knn
Nov 21, 2026
Merged

Kristofferjoha merged 3 commits into
mainfrom
bugfix/watch_knn

Conversation

@tbdlarsen

Copy link
Copy Markdown
Contributor

No description provided.

The loop accepts switches on the tracked J_T, whose kNN term only watches each
query's top k plus its nearest others in the start and single-recipe states. In
a mixed state an unwatched trajectory can enter a top k unseen, so a switch with
a positive tracked gain can lower the real J_T. BUDGET_LOOP, EQUAL_LOOP and the
loop inside each reallocation round now recompute exact J_T before and after,
and keep the start if the loop lost. Adds a 200-trajectory, k = 3 test where
the watch lists cover a small part of the database.
checked_loop takes the start's exact J_T when the caller has it and returns the
result's, and keep() returns each arm's J_T and accepts a known one. With
BUDGET_CHOICE (or EQUAL_CHOICE_RDP_PARTNERS) also requested the check needs no
extra J_T evaluation, and a reallocation round reuses the check's value.
@tbdlarsen

Copy link
Copy Markdown
Contributor Author

Check the loop's result against its start with exact J_T

@tbdlarsen
tbdlarsen marked this pull request as ready for review November 21, 2026 12:34
@Kristofferjoha
Kristofferjoha merged commit c5724e5 into main Nov 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants