Generating Multi-Agent Trajectories using Programmatic Weak Supervision
Code for paper titled Generating Multi-Agent Trajectories using Programmatic Weak Supervision by Zhan et al., ICLR 2019.
Installation & Setup
Code is written using PyTorch version
After cloning the repository, you need to download the data.
The basketball dataset is available from STATS.
The Boids dataset can be generated by running:
$ python datasets/boids/generate_data.py
This may take a while, so a pre-generated Boids dataset is also included in the same link above.
Running the Code
To train a model, you can edit the parameters in
train_model.sh and run the script from the command-line:
After training a model,
$ python sample.py -t <trial_id> -n <num_samples> -b <burn_in> --run --plot
will generate and plot samples from a model and save them in
For full usage, use flag
To see the parameters of a past experiment (for reproducability), run:
$ python scripts/print_params.py -t <trial_id>
To visualize examples from a test dataset, run:
$ python scripts/show_groundtruth.py -d <dataset> -n <num_examples>
which will save them into
To compute and compare domain statistics for basketball, run:
$ python sample.py -t <trial_id> -n 1000 -b 10 --run $ python scripts/compute_bball_stats.py -t <trial_id>
Included in this repository in
saved/ are four pretrained models for basketball as discussed in the paper: