Skip to content

[GradTrak] Joint course-to-requirement matching for double majors - #1212

Open
ethanransing wants to merge 1 commit into
ethan/btll-unit-threshold-matchingfrom
ethan/btll-joint-assignment
Open

[GradTrak] Joint course-to-requirement matching for double majors#1212
ethanransing wants to merge 1 commit into
ethan/btll-unit-threshold-matchingfrom
ethan/btll-joint-assignment

Conversation

@ethanransing

@ethanransing ethanransing commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Split out of #1141. Stacked on #1211. Close #1141 once this merges.

Each major was evaluated on its own, so for double majors an upper-div course could count toward both majors without limit. Berkeley caps this: 2 overlapping UD courses for L&S/CDSS/Haas/cross-college pairs, 5 if both majors are in CoE (L&S, CDSS, CoE). Lower-div overlap is unrestricted.

After per-major evaluation, BtLLInterface now runs a joint pass (runJointReassignment) that pulls the flexible leaves (≥N courses, ≥T units) out of both majors' trees, assigns each course to major A, B, both (under the cap), or neither via backtracking, then writes the assignments back and recomputes And/Or parents. With a single major this is a no-op.

Limitations, same as #1141:

  • Joint majors aren't handled (different overlap rules)
  • CoE's "5 non-overlapping UD technical courses per major" rule isn't encoded
  • 3+ majors: only the first two are considered

20 new tests.

Each major's requirements were evaluated in isolation, so a student with
two majors could count the same upper-division course toward both without
limit — or, depending on evaluation order, have a shared course consumed
by the first major and reported missing from the second.

Berkeley caps upper-division overlap between double majors (2 courses for
L&S, CDSS, Haas and cross-college pairs; 5 when both majors are in CoE).
Lower-division overlap is unrestricted.

This adds a joint matching pass that runs in the frontend after per-major
BtLL evaluation. It extracts the flexible leaves (count and unit
thresholds) from both majors' requirement trees, then backtracks with
pruning to assign each course to major A, major B, both (if the overlap
cap allows), or neither, maximizing satisfied leaves. Results are written
back into the trees and And/Or aggregates are recomputed. With a single
major the pass is a no-op.

Not handled: joint majors (different overlap rules), CoE's "5 distinct UD
technical courses per major" check, and 3+ majors.

Claude-Session: https://claude.ai/code/session_012F9yFMhu4JYgy3BwQSjSDC
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.

1 participant