Update the scoring rules for Norway#388
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts Norway scoring rule multipliers and closing distance weights for free and FAI triangles in the optimizer scoring rules configuration. Flow diagram for updated Norway scoring rules configurationflowchart TB
start[Start scoring for Norway]
start --> A[Apply openDistance rule
multiplier 1]
A --> B{Is task freeTriangle?}
B -->|Yes| C[freeTriangle
closingDistanceRelative 0.05
multiplier 1.6]
B -->|No| D{Is task FAI_triangle?}
D -->|No| E[Use openDistance score only]
D -->|Yes| F{Which closingDistanceRelative?}
F -->|0.05| G[faiTriangle
closingDistanceRelative 0.05
multiplier 1.8]
F -->|0.2| H[faiTriangle
closingDistanceRelative 0.2
multiplier 1.6]
C --> I[Compute candidate score]
E --> I
G --> I
H --> I
I --> end_node[Return best scoring option for Norway]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Please fix the PR title typo ('fro' → 'for') so it’s clear and searchable in the history.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Please fix the PR title typo ('fro' → 'for') so it’s clear and searchable in the history.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 43 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying flyxc with
|
| Latest commit: |
2bec6dd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b96cd20c.flyxc.pages.dev |
| Branch Preview URL: | https://vicb-nw-factors.flyxc.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@libs/optimizer/src/lib/scoring-rules.ts`:
- Around line 40-43: Update the Norway triangle multiplier values so they match
the 2026 XContest rules: change the entry spreading ...freeTriangle with
multiplier 1.4 (closingDistanceRelative: 0.2) to multiplier 1.5, change the
...freeTriangle with multiplier 1.6 (closingDistanceRelative: 0.05) to 1.7,
change the ...faiTriangle with multiplier 1.6 (closingDistanceRelative: 0.2) to
2.2, and change the ...faiTriangle with multiplier 1.8 (closingDistanceRelative:
0.05) to 2.4; locate and modify the array entries that use the freeTriangle and
faiTriangle objects so only the multiplier fields are updated while leaving
closingDistanceRelative values unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e2cea844-c1cc-4886-93a4-5c780861972a
📒 Files selected for processing (1)
libs/optimizer/src/lib/scoring-rules.ts
| { ...freeTriangle, multiplier: 1.6, closingDistanceRelative: 0.05 }, | ||
| { ...freeTriangle, multiplier: 1.4, closingDistanceRelative: 0.2 }, | ||
| { ...faiTriangle, multiplier: 1.8, closingDistanceRelative: 0.05 }, | ||
| { ...faiTriangle, multiplier: 1.6, closingDistanceRelative: 0.2 }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n libs/optimizer/src/lib/scoring-rules.ts | sed -n '35,50p'Repository: vicb/flyXC
Length of output: 827
🌐 Web query:
XContest Norway scoring rules 2026 triangle multipliers
💡 Result:
In XContest Norway (Distanseligaen) for 2026, the scoring factors (multipliers) for triangle tasks, applied to the optimized distance, are: - 5-point distance (free distance): 1.0 - Free triangle: 1.5 - Closed free triangle (closing distance <5%): 1.7 - FAI triangle: 2.2 - Closed FAI triangle (closing distance <5%): 2.4 A flight scores as a triangle if the straight-line distance between start and end points is less than 20% of the turnpoint distance (scoring distance = turnpoint distance minus closing distance). It scores as closed if less than 5%. FAI triangle requires no leg shorter than 28% of total triangle perimeter. XContest automatically optimizes for maximum score from the tracklog. The top 5 flights count in main leagues (HG/PG Open, etc.). Season: Oct 1 to Sep 30.
Citations:
Align Norway multipliers with the published XContest rules.
Current values under-score all triangle flights. The multipliers must match the 2026 XContest Norway rules:
- Free triangle (20% closing): should be
1.5(currently1.4) - Closed free triangle (5% closing): should be
1.7(currently1.6) - FAI triangle (20% closing): should be
2.2(currently1.6) - Closed FAI triangle (5% closing): should be
2.4(currently1.8)
Proposed fix
- { ...freeTriangle, multiplier: 1.6, closingDistanceRelative: 0.05 },
- { ...freeTriangle, multiplier: 1.4, closingDistanceRelative: 0.2 },
- { ...faiTriangle, multiplier: 1.8, closingDistanceRelative: 0.05 },
- { ...faiTriangle, multiplier: 1.6, closingDistanceRelative: 0.2 },
+ { ...freeTriangle, multiplier: 1.7, closingDistanceRelative: 0.05 },
+ { ...freeTriangle, multiplier: 1.5, closingDistanceRelative: 0.2 },
+ { ...faiTriangle, multiplier: 2.4, closingDistanceRelative: 0.05 },
+ { ...faiTriangle, multiplier: 2.2, closingDistanceRelative: 0.2 },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { ...freeTriangle, multiplier: 1.6, closingDistanceRelative: 0.05 }, | |
| { ...freeTriangle, multiplier: 1.4, closingDistanceRelative: 0.2 }, | |
| { ...faiTriangle, multiplier: 1.8, closingDistanceRelative: 0.05 }, | |
| { ...faiTriangle, multiplier: 1.6, closingDistanceRelative: 0.2 }, | |
| { ...freeTriangle, multiplier: 1.7, closingDistanceRelative: 0.05 }, | |
| { ...freeTriangle, multiplier: 1.5, closingDistanceRelative: 0.2 }, | |
| { ...faiTriangle, multiplier: 2.4, closingDistanceRelative: 0.05 }, | |
| { ...faiTriangle, multiplier: 2.2, closingDistanceRelative: 0.2 }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@libs/optimizer/src/lib/scoring-rules.ts` around lines 40 - 43, Update the
Norway triangle multiplier values so they match the 2026 XContest rules: change
the entry spreading ...freeTriangle with multiplier 1.4
(closingDistanceRelative: 0.2) to multiplier 1.5, change the ...freeTriangle
with multiplier 1.6 (closingDistanceRelative: 0.05) to 1.7, change the
...faiTriangle with multiplier 1.6 (closingDistanceRelative: 0.2) to 2.2, and
change the ...faiTriangle with multiplier 1.8 (closingDistanceRelative: 0.05) to
2.4; locate and modify the array entries that use the freeTriangle and
faiTriangle objects so only the multiplier fields are updated while leaving
closingDistanceRelative values unchanged.
Summary by Sourcery
Bug Fixes:
Summary by CodeRabbit