Skip to content

LukeSnow0/Collective-IRL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

radar_collective_rp.py:

This script simulates assignable per-agent choices under a common probe/price vector and reconstructs each agent’s utility via Afriat's Theorem. Because each agent’s bundle is observed at every time step (probe–response pairs), agents are identified without label ambiguity.

What this project does

  1. Simulate data (generator):
    For t = 1..N, draw a probe vector a_t and solve a constrained nonlinear program that allocates resources across M agents, maximizing a weighted sum of known utility shapes (used only for simulation). Constraint:
    [ \sum_{j=1}^M a_t^\top, b_{j,t} \le y_t. ]

  2. Reconstruct utilities (Afriat per agent):
    For each agent ( j ), solve the Afriat LP to obtain ( {u_{j,t}, \lambda_{j,t}}{t=1}^N ) such that: [ u{j,t} \le u_{j,s} + \lambda_{j,s}, a_s^\top\big(b_{j,t} - b_{j,s}\big) - \phi_j \quad \forall s,t. ] This yields a piecewise-linear concave utility representation for that agent.

  3. Diagnostics & plots:
    Prints the max Afriat violation per agent (should be ~≤ 0 up to tolerance) and plots Agent j Reconstructed Utility vs Agent j True Utility.


statistical_detector.py:

This script compares a coordinating regime (responses generated by optimizing a scalarized multi-objective utility under a linear budget) against a non-coordinating regime (random, noisy responses).

For each noise level it:

  1. Simulates probe vectors (a_t) and noisy responses (\beta_t).
  2. Builds the empirical CDF of a noise-driven statistic (M=\max_{t\neq s} a_t^\top(\varepsilon_t-\varepsilon_s)).
  3. Solves an Afriat-style LP to obtain (\Phi^*) (the minimal slack (\phi)).
  4. Reports the summary metric (1-\widehat F_\Psi(\Phi^*)) and aggregates over Monte Carlo runs.

Higher values of this metric indicate data that look more consistent with coordination at that noise level.


robust_rp.m:

MATLAB code for simulating robust revealed preference (RP) utility reconstruction under noisy multi-agent decision data.
It implements both the classical Afriat inequalities and a distributionally robust extension (finite-reduction algorithm), and evaluates their predictive performance.

Overview

  • Data generation: Synthetic agent responses are generated by solving multi-objective optimization problems under random probes.
  • Noise model: Gaussian noise is added to observed responses at varying levels.
  • Reconstruction methods:
    1. Classical Afriat (LP-based)
    2. Robust Afriat (finite-reduction)
  • Evaluation: Reconstructed utilities are tested out-of-sample. Performance is measured via:
    • Average prediction error
    • Worst-case prediction error
  • Outputs: Plots comparing classical vs. robust methods, and statistics across Monte Carlo runs.

functions:

  • Robust_rp.m – Main MATLAB script (run this file to reproduce experiments).
  • Helper functions are defined inline at the bottom of the script:
    • af_eval – Evaluates Afriat inequality violations.
    • mcval, mcval2 – Subproblem objectives for robust optimization.
    • L1dist – Computes L1 distance between true and reconstructed utilities.
    • RPcon3 – Constraint generator for robust subproblem.

About

Numerical simulatons for statistical coordination detection and robust utility reconstruction in multi-agent coordinated sensing systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors