| "agent_query": "\n# Borden 3D Groundwater Contaminant Source Inversion\n\n## Task\nYou are given a Borden-style 3D groundwater contaminant migration scene derived from a Borden-AdePy reproduction workflow. Your task is to infer a **finite-duration rectangular-region contaminant source** from public monitoring-well readings.\n\nThis is not a point-source task. A point-source answer or the old `x0,y0,z0,C0` schema is accepted only as a degenerate fallback and cannot receive full credit.\n\n## Required source parameterization\nCreate `answer.json` in the task root using this schema:\n\n```json\n{\n \"source_type\": \"rectangular_region\",\n \"dimension\": 3,\n \"x_center\": 0.0,\n \"y_center\": 0.0,\n \"z_center\": 0.0,\n \"half_length_x\": 0.0,\n \"half_length_y\": 0.0,\n \"half_length_z\": 0.0,\n \"C0\": 0.0,\n \"t_start\": 0.0,\n \"duration\": 0.0,\n \"transport_model\": {\n \"equation_type\": \"advection_dispersion_reaction\",\n \"governing_equation\": \"R*dC/dt = div(D grad C) - v dot grad C - lambda*C + source\",\n \"velocity_m_per_day\": 0.0,\n \"alpha_L_m\": 0.0,\n \"alpha_TH_m\": 0.0,\n \"alpha_TV_m\": 0.0,\n \"porosity\": 0.0,\n \"retardation_factor\": 1.0,\n \"lambda_per_day\": 0.0,\n \"numerical_approach\": \"brief description of forward model and optimization\"\n },\n \"method\": \"brief description of your inversion method\"\n}\n```\n\n- `x_center,y_center,z_center`: center of the rectangular source region, in meters.\n- `half_length_x,half_length_y,half_length_z`: half sizes of the rectangular source region, in meters.\n- `C0`: effective source concentration/intensity, in mg/L.\n- `t_start`: release start time in days.\n- `duration`: release duration in days.\n- `transport_model`: your groundwater solute transport construction. Include the\n ADE/reaction governing equation, public hydrogeologic parameters used, and the\n numerical or analytical approximation used to predict concentrations.\n\nAll parameters must stay within `public_problem_config.json` → `source_search_bounds_for_agent`.\n\n## Provided files\n\n- `public_problem_config.json`: Borden grid, hydrogeological parameters, source prior bounds, and column definitions.\n- `public_source_prior.json`: explicit range summary for the finite-duration rectangular-region source parameters.\n- `borden_grid.npz`: grid arrays exported from the Borden-AdePy scene, including x/y grid and bottom profile.\n- `public_wells.csv`: public monitoring-well coordinates.\n- `public_monitoring_data.csv`: noisy, censored public monitoring observations. Clean generated\n concentrations are not provided to the agent.\n- `baseline_solver.py`: writes a legal low-quality baseline `answer.json` from the center of the parameter bounds.\n- `answer_template.json`: required output schema.\n\nNo runnable scientific starter solver is provided. You should write your own Python code to read files, construct the groundwater solute transport equation, build an ADE/AdePy or equivalent forward approximation, optimize the source parameters, and update `answer.json`.\n\n## Mandatory baseline workflow\n\nBefore implementing a complex inversion algorithm, first ensure that a valid `answer.json` exists:\n\n```bash\npython baseline_solver.py\n```\n\nThen iteratively improve `answer.json` using public monitoring data. Missing `answer.json` gives zero.\n\n## Scoring policy\n\nThe judge does not grade old point-source location error directly. It evaluates whether your finite-duration rectangular-region source predicts withheld monitoring readings:\n\n1. Read `answer.json`.\n2. Check required finite-region fields and parameter bounds.\n3. Use a hidden Borden-ADE region-source forward model to predict concentrations at hidden monitoring wells and hidden future times.\n4. Compare predictions with hidden readings using relative RMSE and log-scale metrics.\n5. Hidden prediction dominates the score. Easy format/prior/method/transport-equation points are capped and cannot exceed the hidden-quality caps.\n6. Region-shape and physical-consistency points are gated by hidden prediction quality.\n7. Very poor hidden/future prediction is capped at 15 points; poor-but-improving prediction is capped at 30 points; moderate prediction is capped at 45 points.\n\nIf hidden monitoring prediction is poor, the final score is capped. This makes early baseline or shallow point-source fits low-scoring, while still allowing genuine improvement through better region-source inversion.\n\n## Rules\n\n- Do not read or reference hidden scoring files.\n- Do not hard-code hidden monitoring readings.\n- Do not modify judge files.\n- Do not call FloPy, MODFLOW, MT3DMS, or external groundwater executables.\n- You may use Python libraries such as NumPy, SciPy, pandas, matplotlib, pymoo, and AdePy if available.\n- Submit all scripts/results needed to reproduce your `answer.json`.\n\n## Critical submission rule\n\nThe judge only reads answer.json in the task root.\n\nIt does not automatically run inverse_solver.py, run_checks.py, write_fit_report.py,\nwrite_public_predictions.py, or any other script during scoring.\n\nTherefore, after every meaningful inversion or optimization step, you must immediately\noverwrite the task-root answer.json with the best current source parameters.\n\nIf answer.json is unchanged, the score and all METRICS will remain unchanged, even if\nyou create new Python scripts, reports, or prediction files.\n\nRecommended workflow:\n\n1. Run python baseline_solver.py only as an initial fallback.\n2. Implement and run your inversion script.\n3. After each improved parameter set is found, write it to answer.json.\n4. Run python validate_answer.py if available.\n5. Submit only after confirming that answer.json has changed.\n" |