Files
2nd/10_Wiki/Topic_Programming/AI_and_ML/게이미피케이션.md
T
Antigravity Agent 9148c358d0 docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
2026-07-05 00:33:48 +09:00

6.6 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-게이미피케이션 게이미피케이션 10_Wiki/Topics verified self
Gamification
게임화
Game-like Mechanics
none A 0.9 applied
game-design
behavior
motivation
ux
2026-05-10 pending
language framework
typescript behavioral-design / Octalysis

게이미피케이션

매 한 줄

"매 non-game context에 game-design element를 적용해 user motivation / engagement / behavior를 reshape". 2002 Nick Pelling의 용어 등장 → 2010 Foursquare 배지로 mainstream → 2014 Yu-kai Chou의 Octalysis 8-driver framework → 2026 현재 Duolingo · Strava · Apple Fitness가 industry exemplar이며 LLM-generated personalized quests가 emerging.

매 핵심

매 PBL Triad (Basic)

  • Points (P): 매 quantitative score — XP, currency.
  • Badges (B): 매 achievement marker — collection / status.
  • Leaderboards (L): 매 social comparison — ranked scoreboard.

매 Octalysis 8 Core Drives (Yu-kai Chou)

  1. Epic Meaning: 매 큰 mission의 일부 — Wikipedia 기여.
  2. Development & Accomplishment: 매 progress / mastery — Duolingo streak.
  3. Empowerment of Creativity: 매 player creativity expression — Minecraft.
  4. Ownership & Possession: 매 collection / customization.
  5. Social Influence: 매 peer comparison / cooperation.
  6. Scarcity & Impatience: 매 limited-time / FOMO.
  7. Unpredictability: 매 variable reward — gacha, slot.
  8. Loss & Avoidance: 매 streak break 회피.

매 응용

  1. Duolingo — streak, league, hearts (loss-avoidance).
  2. Strava — segment leaderboard, kudos.
  3. Apple Fitness — 3 rings + 30-day challenge.
  4. Habitica — RPG-style habit tracker.
  5. LinkedIn — profile completion %, "All-Star" badge.

💻 패턴

XP / Level System

const xpForLevel = (level: number): number =>
  Math.floor(100 * Math.pow(level, 1.5));

export function levelFromXP(totalXP: number): { level: number; progress: number } {
  let level = 1;
  let acc = 0;
  while (acc + xpForLevel(level) <= totalXP) {
    acc += xpForLevel(level);
    level++;
  }
  const inLevel = totalXP - acc;
  const need = xpForLevel(level);
  return { level, progress: inLevel / need };
}

Streak Tracker

import { differenceInCalendarDays } from 'date-fns';

interface StreakState { current: number; longest: number; lastActiveDate: Date }

export function recordActivity(state: StreakState, now: Date = new Date()): StreakState {
  const gap = differenceInCalendarDays(now, state.lastActiveDate);
  if (gap === 0) return state;                    // already counted today
  if (gap === 1) {                                // consecutive day
    const next = state.current + 1;
    return { current: next, longest: Math.max(next, state.longest), lastActiveDate: now };
  }
  return { current: 1, longest: state.longest, lastActiveDate: now };  // broken
}

Badge Engine (rule-based)

type BadgeRule = { id: string; name: string; check: (s: PlayerStats) => boolean };

const RULES: BadgeRule[] = [
  { id: 'first_blood', name: 'First Win', check: s => s.wins >= 1 },
  { id: 'centurion', name: '100 Wins', check: s => s.wins >= 100 },
  { id: 'streak_30', name: '30-Day Streak', check: s => s.streak >= 30 },
];

export function evaluateBadges(stats: PlayerStats, owned: Set<string>): string[] {
  return RULES.filter(r => !owned.has(r.id) && r.check(stats)).map(r => r.id);
}

Variable Reward (Loot Box) with disclosed odds

type Drop = { item: string; weight: number };

export function rollLoot(table: Drop[], rng: () => number = Math.random): string {
  const total = table.reduce((s, d) => s + d.weight, 0);
  let r = rng() * total;
  for (const d of table) {
    r -= d.weight;
    if (r <= 0) return d.item;
  }
  return table[table.length - 1].item;
}

// 매 disclosed odds (regulatory: KR / CN / BE / NL)
const TABLE: Drop[] = [
  { item: 'common',    weight: 70 },
  { item: 'rare',      weight: 25 },
  { item: 'epic',       weight: 4.5 },
  { item: 'legendary',  weight: 0.5 },
];

Leaderboard (Redis ZSET)

import { Redis } from '@upstash/redis';
const redis = Redis.fromEnv();

export async function recordScore(userId: string, score: number) {
  await redis.zadd('leaderboard:weekly', { score, member: userId });
}

export async function topN(n = 10) {
  return redis.zrange('leaderboard:weekly', 0, n - 1, { rev: true, withScores: true });
}

export async function rankOf(userId: string) {
  return redis.zrevrank('leaderboard:weekly', userId);
}

Personalized Quest (LLM-generated)

import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();

export async function dailyQuest(profile: { skills: string[]; weak: string[]; mood: string }) {
  const msg = await client.messages.create({
    model: 'claude-opus-4-7',
    max_tokens: 200,
    system: 'Generate ONE daily quest for a learning app. Output JSON: {title, goal, xp, steps[]}',
    messages: [{ role: 'user', content: JSON.stringify(profile) }],
  });
  return JSON.parse((msg.content[0] as { text: string }).text);
}

매 결정 기준

상황 Approach
Education app Streak + XP + League (Duolingo)
Fitness Goal-rings + monthly challenge
Productivity Habit-RPG (Habitica)
Enterprise training Badge + leaderboard, opt-in
Health-critical Avoid scarcity / FOMO — ethical-only

기본값: PBL + 1~2 Octalysis drives matched to context, with disclosed-odds + opt-out.

🔗 Graph

🤖 LLM 활용

언제: personalized quest generation, badge naming, encouragement copy, weakness-targeted exercise sequencing. 언제 X: 매 reward-schedule design — RL / behavioral economist domain (LLM은 hidden bias 위험).

안티패턴

  • Pointsification: 매 PBL만 얹기 — intrinsic motivation 없으면 6주 후 fatigue.
  • Dark patterns: 매 streak shame, FOMO-pressure, sunk-cost manipulation.
  • One-size-fits-all: 매 모든 user에 leaderboard — competitive-averse user 이탈.
  • Reward inflation: 매 점차 큰 보상 → 매 동일 효과 위해 escalation 필요.

🧪 검증 / 중복

  • Verified (Yu-kai Chou Actionable Gamification, Self-Determination Theory, Duolingo Engineering Blog 2024).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — PBL + Octalysis 8 drives + ethical guardrails 정리