----------------------
Supplementary Material
----------------------

May 9, 2024

This folder contains the supplementary material for the paper: 

Multimedia files:
    video.mp4
    code_example.ipynb
    compiler.ipynb

video.mp4
---------

codecs: H.264
requirements: We recommend using VLC media player to view the video. 
version number: Tested with versions 3.0.16 Vetinari and 3.0.9.2 Vetinari.

Note that the video includes audio.

code_example.ipynb
------------------

The code example offers two implementations (readable, optimized) of Algorithms 1 and 2 as detailed in the paper, complete with explanatory comments.

To execute the code example in Google Colab, please follow these steps:

    Open Google Colab: https://colab.research.google.com/.
    Sign in using your Google account.
    Click on File > Upload notebook.
    Select the Upload tab in the dialog box.
    Click on Choose File and upload code_example.ipynb from your local machine.
    Once uploaded, the notebook will open in Colab and you can run the code cells as needed.

To run the code locally, install the supergraph package in a Python (>= 3.8) environment using the command:
    pip install supergraph[paper]

compiler.ipynb
--------------
This notebook demonstrates how computation graphs can be efficiently compiled into robotic environments.
It features our supergraph method at its core. 
This tool enables users to enhance dynamical systems, modeled as networks of nodes, with efficient delay simulation capabilities. 
Essentially, it accepts computation graphs and compiles them into an environment with a gym-like interface, complete with 'reset' and 'step' functions. 

To execute the code example in Google Colab, please follow these steps:

    Open Google Colab: https://colab.research.google.com/.
    Sign in using your Google account.
    Click on File > Upload notebook.
    Select the Upload tab in the dialog box.
    Click on Choose File and upload code_example.ipynb from your local machine.
    Once uploaded, the notebook will open in Colab and you can run the code cells as needed.
    
To run the code locally, install the supergraph package in a Python (>= 3.8) environment using the command:
    pip install supergraph[paper]
    
    In addition, it requires `pip install jax flax tensorflow-probability brax==0.9.4`
    The code was tested with jax==0.4.13, flax=0.7.2, and tensorflow-probability==0.21.0
       
