"use client"; import { motion } from "framer-motion"; import { COLORS, VizFrame } from "./common"; import { useReducedMotion } from "@/lib/hooks/useReducedMotion"; export function AgentEnvLoop({ width = 640, height = 360 }: { width?: number; height?: number }) { const cx = width / 2; const cy = height / 2; const dx = 180; const reduce = useReducedMotion(); const repeat = reduce ? 0 : Infinity; return ( {[ { x: cx - dx, y: cy, label: "Agent", sub: "policy π(a | s)" }, { x: cx + dx, y: cy, label: "Environment", sub: "transition p(s' | s, a)" }, ].map((b) => ( {b.label} {b.sub} ))} {/* Top arc: action */} action a {/* Bottom arc: state + reward */} state s, reward r ); }