Skip to content

[1.0 algorithm] Rework problem 257 interactor scoring (k-based, compressed)#149

Merged
joyemang33 merged 1 commit into
FrontierCS:mainfrom
whuang369:tune-257-scoring
Jun 13, 2026
Merged

[1.0 algorithm] Rework problem 257 interactor scoring (k-based, compressed)#149
joyemang33 merged 1 commit into
FrontierCS:mainfrom
whuang369:tune-257-scoring

Conversation

@whuang369

Copy link
Copy Markdown
Contributor

Tune the "Omkar and Modes" (257) interactive grader so scores discriminate solution quality instead of clustering near full marks:

  • Switch the dynamic-scoring thresholds from n-based (k_base=n, k_zero=2n) to k-based, where k = number of distinct value-blocks in the array (k_base = C_BASEk, k_zero = C_ZEROk). This forces solutions to exploit the sorted/mode structure rather than trivially scanning n positions.
  • Score on a single unbounded quadratic curve; report the raw (unbounded) value and clip the bounded score to 100. r is floored at 0 before squaring so the curve stays monotonic and non-negative past k_zero.
  • Set C_BASE=3, C_ZERO=15 to compress the current solution pool (avg ~65 -> ~44) while keeping the canonical divide-and-conquer solution near the top (~95).

Summary

Please read CONTRIBUTING.md before submitting.

Type of Change

  • New research problem
  • New algorithmic problem
  • New Frontier-CS 2.0 problem
  • Bug fix
  • Documentation update
  • Other:

Testing

Checklist

  • Code follows the project structure and conventions
  • Self-review completed
  • Documentation updated (if applicable)

CI Validation (for new problems)

When adding new problems, CI will automatically validate that your reference solution achieves score > 0.

  • Algorithmic problems: Include reference.cpp in your problem directory
  • Research problems: Include reference.py (or reference.cpp if language: cpp in config.yaml)
  • 2.0 problems: Include reference.py unless the problem config declares another language

@joyemang33 joyemang33 changed the title Rework problem 257 interactor scoring (k-based, compressed) [1.0 algorithm] Rework problem 257 interactor scoring (k-based, compressed) Jun 13, 2026
@joyemang33

Copy link
Copy Markdown
Contributor

Hi @whuang369. Thanks for the contribution! Please also attach the harbor trial output for this problem. How are the C_BASE and C_ZERO set here? Can we set them to a lower value so that squeeze the best score a little bit to have more improvement space?

Tune the "Omkar and Modes" (257) interactive grader so scores discriminate
solution quality and leave room above the current solution pool:

- Switch dynamic-scoring thresholds from n-based (k_base=n, k_zero=2n) to
  k-based, where k = number of distinct value-blocks in the array
  (k_base = C_BASE*k, k_zero = C_ZERO*k). This rewards exploiting the
  sorted/mode structure instead of trivially scanning n positions.
- Score on a single unbounded quadratic curve; report the raw (unbounded)
  value and clip the bounded score to 100. r is floored at 0 before squaring
  so the curve stays monotonic and non-negative past k_zero.
- Set C_BASE=1, C_ZERO=12. C_BASE=1 anchors full score at the
  information-theoretic floor (~k queries to locate k blocks), which is
  unreachable in practice, so the best current solutions top out around 74
  (std divide-and-conquer ~70) leaving real improvement space; the pool
  spreads from 0 to 74 (avg ~34) instead of clustering near full marks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@whuang369

Copy link
Copy Markdown
Contributor Author
257_harbor_trial 257_new_grading Hi @joyemang33 , thank you for your advise and information! I've updated the grading parameters for this problem, and ran harbor over this problem. Attached images are the new grading rules and harbor trial!

@joyemang33

Copy link
Copy Markdown
Contributor

LGTM thanks!

@joyemang33 joyemang33 merged commit 4ac2879 into FrontierCS:main Jun 13, 2026
3 of 4 checks 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