[feat] 데이트 코스 생성 알고리즘 개선 (하드 룰 → 소프트 룰)#8
Merged
Conversation
- 코스 간 장소 중복 하드 제외 → 사용 횟수 기반 점수 패널티로 전환 (0회 ×1.0 / 1회 ×0.6 / 2회 ×0.3 ...) - 최고점 고정 선택 → 점수 기반 Weighted Random Selection (SHARPNESS=2.0) - 코스 내부 장소 중복 금지는 유지 - 배치 내 동일 코스 출력 방지를 위한 제한적 재추첨(최대 5회) 추가 - CourseSelectorTest: 하드 제외 검증 → 중복 허용·패널티·확률 검증으로 교체 - CourseDiversityMetricsTest: 발표용 생성 성공률·중복률·고유 장소 수 측정 추가 - seed-local-scarce.sql: 장소 부족 시나리오(FOOD2/CAFE1/ACT1) 시연용 시드 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
일단 코스 새로고침 또는 새로운추천제공 기능은 구현하지 않음 |
1000hyehyang
approved these changes
Jun 13, 2026
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.
✨ 무엇을 바꿨나요?
데이트 코스 생성 시 코스 간 장소 중복을 완전 제외(하드 룰)하던 방식을 **점수 패널티(소프트 룰)**로 전환하고, 최고점 장소를 고정 선택하던 방식을 **점수 기반 확률 선택(Weighted Random)**으로 개선했습니다.
🔗 관련 이슈
Closes #7
💡 왜 바꿨나요?
기존 방식은 GENERAL → TRENDY → POPULAR 순서로 코스를 생성하면서 이전 코스에서 사용한 장소를 다음 코스에서 완전히 제외했다. 장소 수가 부족할 경우 후순위로 생성되는 코스가 채울 후보가 없어 슬롯이 잘리거나 코스 생성 자체가 실패하는 문제가 있었다. 또한 항상 최고점 장소만 고정 선택되어 동일한 요청에 대해 매번 똑같은 코스가 생성되는 한계가 있었다.
📝 주요 변경 사항
👀 리뷰어가 보면 좋은 부분
🧪 테스트
방식 (해당하는 것만 체크)
메모 (시나리오, 커맨드, 스크린샷 링크 등 — 선택)