# YC-Bench default preset — hardened 3-year benchmark
#
# This is the canonical benchmark configuration. Every parameter is listed
# explicitly so this file serves as complete documentation of what is tunable.
# Copy this file and override only what you need.

# experiment identity (top-level fields)
name        = "default"
description = "Hardened 3-year benchmark. Most tasks require prestige 3-5, 2-domain work, tight deadlines, costly cancellations."

# ---------------------------------------------------------------------------
# LLM agent
# ---------------------------------------------------------------------------

[agent]
model                    = "openrouter/z-ai/glm-5"
temperature              = 0.0
top_p                    = 1.0
request_timeout_seconds  = 300.0
retry_max_attempts       = 3
retry_backoff_seconds    = 1.0

# Conversation rounds retained in context before each API call.
# Older rounds are dropped proactively. Scratchpad survives truncation.
history_keep_rounds      = 20

# Optional system prompt override. Omit to use the built-in prompt.
# system_prompt = "..."

# ---------------------------------------------------------------------------
# Agent loop
# ---------------------------------------------------------------------------

[loop]
# Consecutive turns without `sim resume` before the loop forces a time-advance.
auto_advance_after_turns = 10

# Hard cap on total turns. Comment out or set to a large number for unlimited.
# max_turns = 500

# ---------------------------------------------------------------------------
# Simulation
# ---------------------------------------------------------------------------

[sim]
start_date    = "2025-01-01"    # ISO 8601
horizon_years = 3
company_name  = "BenchCo"

# ---------------------------------------------------------------------------
# World generation — scalar parameters
# ---------------------------------------------------------------------------

[world]
num_employees            = 10
initial_funds_cents      = 15_000_000    # $150,000
initial_prestige_level   = 1.0
work_hours_per_day       = 9.0

num_market_tasks             = 200
market_browse_default_limit  = 50

# Salary bump per completed task — each assigned employee gets this raise.
# Compounds over time, accelerating payroll pressure.
salary_bump_pct = 0.01
salary_max_cents = 10_000_000   # cap individual salary at $100K/month
skill_rate_max   = 10.0         # cap employee skill rate

# --- Prestige mechanics ---
prestige_max  = 10.0
prestige_min  = 1.0

# Cancelling (2x) is worse than failing (1.4x) at the margin — accepting
# is a real commitment, not a free option.
penalty_fail_multiplier    = 1.4    # hardened: was 0.8
penalty_cancel_multiplier  = 2.0    # hardened: was 1.2

# Extra reward fraction per prestige level above 1.
# At 0.55: a prestige-8 task pays ~4.85x more than a prestige-1 task.
reward_prestige_scale = 0.55    # hardened: was 0.3

# --- Client trust ---
# trust_build_rate:       ~tasks to reach 80% max trust (higher = slower)
# trust_fragility:        0-1, how punishing failures/inactivity are
# trust_focus_pressure:   0-1, penalty for spreading work across clients
# trust_reward_ceiling:   payout multiplier a Premium client gives at max trust
# trust_work_reduction_max: max work reduction at max trust
# trust_gating_fraction:  fraction of tasks that require established trust
num_clients              = 8
trust_max                = 5.0
trust_build_rate         = 20.0
trust_fragility          = 0.5
trust_focus_pressure     = 0.5
trust_reward_ceiling     = 2.6
trust_work_reduction_max = 0.40
trust_gating_fraction    = 0.20

# Daily prestige decay per domain. Domains not exercised lose prestige
# over time: -0.005/day → -0.15/month. Untouched domain drops ~1 level
# every ~6 months. Prevents single-domain hyper-specialization.
prestige_decay_per_day = 0.005

# Required qty scaling by prestige: qty *= 1 + scale * (prestige - 1).
# At 0.3: prestige-5 tasks need 2.2x the work of prestige-1 tasks.
# High prestige pays more but demands proportionally more capacity.
prestige_qty_scale = 0.3

# --- Deadline ---
# Deadline = max(deadline_min_biz_days, max_domain_qty / deadline_qty_per_day).
# Domains are worked in parallel, so deadline scales with heaviest domain, not sum.
deadline_qty_per_day   = 200.0
deadline_min_biz_days  = 7

# --- Progress milestones (checkpoint events at these completion fractions) ---
task_progress_milestones = [0.25, 0.5, 0.75]

# --- Business hours ---
workday_start_hour = 9
workday_end_hour   = 18

# ---------------------------------------------------------------------------
# World distributions
#
# Each [world.dist.<name>] section specifies the distribution used for one
# random quantity. Change `type` to switch families; tune the parameters to
# reshape the distribution.
#
# Available types: triangular, beta, normal, uniform, constant
# ---------------------------------------------------------------------------

# Prestige level required to accept a task (cast to int after sampling).
# mode=4 means most tasks need prestige 3-5 — the early market is thin,
# forcing agents to choose which domains to specialise in.
[world.dist.required_prestige]
type = "triangular"
low  = 1
high = 10
mode = 4            # hardened: base default is mode=1

# Base reward paid on task completion, in cents (scaled further by prestige).
# Mode $7K: prestige-1 tasks burn cash, prestige-4+ profits.
[world.dist.reward_funds_cents]
type = "triangular"
low  = 150_000      # $1,500
high = 2_000_000    # $20,000
mode = 700_000      # $7,000

# Number of domains each task requires work in (cast to int after sampling).
# mode=2: most tasks need 2 domains — single-specialist dominance gone.
[world.dist.domain_count]
type = "triangular"
low  = 1
high = 3
mode = 2            # hardened: base default is mode=1

# Work units required per domain per task (cast to int after sampling).
# No trivially-small tasks: every task requires sustained employee-hours.
[world.dist.required_qty]
type = "triangular"
low  = 800          # hardened: base default is 200
high = 4000
mode = 2000         # hardened: base default is 800

# Prestige delta awarded per domain on task success.
# Mean ~0.1: climbing prestige 1→5 takes ~40 tasks.
[world.dist.reward_prestige_delta]
type  = "beta"
alpha = 1.2
beta  = 2.8
scale = 0.35
low   = 0.0
high  = 0.35

# Skill rate boost applied to each assigned employee on task success.
# Expressed as a fraction of current rate: 0.12 → average 12% boost.
[world.dist.skill_boost]
type  = "normal"
mean  = 0.12
stdev = 0.06
low   = 0.01
high  = 0.40

# ---------------------------------------------------------------------------
# Salary tiers — all three share values must sum to exactly 1.0
# ---------------------------------------------------------------------------

[world.salary_junior]
name       = "junior"
share      = 0.50
min_cents  = 200_000    # $2,000/month
max_cents  = 400_000    # $4,000/month
rate_min   = 1.0        # units/hour
rate_max   = 4.0

[world.salary_mid]
name       = "mid"
share      = 0.35
min_cents  = 600_000    # $6,000/month
max_cents  = 800_000    # $8,000/month
rate_min   = 4.0
rate_max   = 7.0

[world.salary_senior]
name       = "senior"
share      = 0.15
min_cents  = 1_000_000  # $10,000/month
max_cents  = 1_500_000  # $15,000/month
rate_min   = 7.0
rate_max   = 10.0
