0

Calendar Scheduling RL Env (Prime)

Fresh

Stateful tool-based environment for constrained meeting scheduling

Type
RL Env
Publisher
Prime
Runtime
multi-turn
License
unknown
Size
v0.1.5
Published
Feb 2026

Cite

Notes

Only stored in your browser.

calendar-scheduling

Procedural StatefulToolEnv for meeting-time negotiation under realistic calendar constraints.

Overview

  • Environment ID: calendar-scheduling
  • Type: multi-turn tool use (StatefulToolEnv)
  • Objective: submit one meeting window that maximizes weighted attendee utility while satisfying hard constraints
  • Reward:
    • 0.0 if final submission is invalid or missing
    • otherwise weighted average attendee utility in [0, 1]

Each task contains:

  • attendees with busy calendars,
  • required and optional participants,
  • timezone offsets,
  • hard local-time bounds (for a subset of attendees),
  • soft preferences (day, early/late, back-to-back),
  • room availability,
  • fixed meeting duration.

Attendee importance weights are normalized to sum to 1.0 per task.

Tools

  • check_attendee_calendar(attendee_id, day_index)
  • view_attendee_constraints(attendee_id)
  • check_proposal(day_index, start_time_utc, duration_minutes, room_id)
  • submit_window(day_index, start_time_utc, duration_minutes, room_id)

All tool responses include remaining_turns. check_proposal is limited by a per-task score-check budget to discourage brute-force probing.

Deterministic Oracle

Generation uses deterministic rejection sampling plus exhaustive search over candidate windows to compute:

  • optimal_score
  • best_proposals
  • valid candidate count and search diagnostics

This metadata is stored with each example and used for metrics (for example submission-to-optimal ratio).

Quickstart

Install local environment:

prime env install calendar-scheduling

Run a small eval:

prime eval run calendar-scheduling -n 5 -r 1 -m qwen3-30b-i -e configs/endpoints.toml --skip-upload

Run with custom environment args:

prime eval run calendar-scheduling -n 8 -r 1 -m qwen3-30b-i -e configs/endpoints.toml --skip-upload -a '{"difficulty": "hard", "max_turns": 12, "generator_overrides": {"score_check_budget": 3}}'

Standalone TUI

Render a generated problem in terminal:

uv run --project environments/calendar_scheduling calendar-scheduling-tui --difficulty medium --seed 42 --show-oracle

The TUI shows attendees, room lanes, busy blocks, and highlights oracle windows when --show-oracle is enabled.

Environment Arguments

ArgTypeDefaultDescription
difficultystr"medium"High-level task preset (easy, medium, hard)
num_trainint512Number of generated training tasks
num_evalint128Number of generated evaluation tasks
num_examplesint | NoneNoneBackwards-compatible alias: sets both train and eval sizes
seedint7Base deterministic seed
max_turnsint | NoneNoneTurn cap per rollout (preset default when unset)
generator_overridesdict | NoneNoneFine-grained generation overrides for GenerationConfig fields

Common generator_overrides keys:

  • attendee_count_range
  • window_days_range
  • meeting_duration_choices
  • score_check_budget
  • min_valid_candidates
  • max_valid_ratio
  • max_random_baseline_score
  • max_generation_attempts

Metrics

MetricMeaning
rewardFinal reward (submitted valid score or 0.0)
submission_madeWhether agent called submit_window
submission_validWhether submitted window passed hard constraints
oracle_optimal_scoreExhaustive best possible score for the task
submitted_to_optimal_ratiosubmitted_score / oracle_optimal_score (clamped)
optimality_gaporacle_optimal_score - submitted_score
score_checks_usedNumber of check_proposal calls consumed
score_checks_remainingRemaining proposal-check budget