├── .gitignore ├── README.md ├── environment.yml ├── examples ├── plot │ ├── collect_data_grid.py │ ├── plot_ablation.py │ ├── plot_bar.py │ ├── plot_curves.py │ └── plot_map.py ├── ppo_barrier_car_brake.py ├── ppo_barrier_metadrive.py ├── ppo_barrier_safety_gym.py ├── ppo_barrier_unicycle.py ├── ppo_lagrangian_metadrive.py ├── ppo_lagrangian_safety_gym.py ├── ppo_metadrive.py └── ppo_safety_gym.py ├── setup.py └── srlnbc ├── __init__.py ├── agents ├── __init__.py ├── callbacks │ ├── __init__.py │ └── metadrive.py └── safety │ ├── __init__.py │ ├── execution_ops.py │ ├── mixin.py │ ├── ppo_barrier │ ├── __init__.py │ ├── ppo_barrier.py │ └── ppo_barrier_tf_policy.py │ └── ppo_lagrangian │ ├── __init__.py │ ├── ppo_lagrangian.py │ └── ppo_lagrangian_tf_policy.py ├── env ├── __init__.py ├── car_brake.py ├── config.py ├── metadrive_intersection.py ├── metadrive_rules.py ├── metadrive_singleton.py ├── metadrive_utils.py ├── my_metadrive.py ├── register.py ├── simple_safety_gym.py ├── unicycle.py └── xmls │ └── point.xml ├── models ├── __init__.py ├── safety_model.py └── tf │ ├── __init__.py │ ├── fcnet.py │ ├── misc.py │ ├── safety_certificate_fcnet.py │ ├── safety_fcnet.py │ └── safety_statewise_fcnet.py └── utils ├── __init__.py ├── path.py └── tune.py /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | *.py[cod] 3 | 4 | *.egg-info/ 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/README.md -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/environment.yml -------------------------------------------------------------------------------- /examples/plot/collect_data_grid.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/plot/collect_data_grid.py -------------------------------------------------------------------------------- /examples/plot/plot_ablation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/plot/plot_ablation.py -------------------------------------------------------------------------------- /examples/plot/plot_bar.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/plot/plot_bar.py -------------------------------------------------------------------------------- /examples/plot/plot_curves.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/plot/plot_curves.py -------------------------------------------------------------------------------- /examples/plot/plot_map.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/plot/plot_map.py -------------------------------------------------------------------------------- /examples/ppo_barrier_car_brake.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_barrier_car_brake.py -------------------------------------------------------------------------------- /examples/ppo_barrier_metadrive.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_barrier_metadrive.py -------------------------------------------------------------------------------- /examples/ppo_barrier_safety_gym.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_barrier_safety_gym.py -------------------------------------------------------------------------------- /examples/ppo_barrier_unicycle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_barrier_unicycle.py -------------------------------------------------------------------------------- /examples/ppo_lagrangian_metadrive.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_lagrangian_metadrive.py -------------------------------------------------------------------------------- /examples/ppo_lagrangian_safety_gym.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_lagrangian_safety_gym.py -------------------------------------------------------------------------------- /examples/ppo_metadrive.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_metadrive.py -------------------------------------------------------------------------------- /examples/ppo_safety_gym.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/examples/ppo_safety_gym.py -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/setup.py -------------------------------------------------------------------------------- /srlnbc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/agents/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/agents/callbacks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/callbacks/__init__.py -------------------------------------------------------------------------------- /srlnbc/agents/callbacks/metadrive.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/callbacks/metadrive.py -------------------------------------------------------------------------------- /srlnbc/agents/safety/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/agents/safety/execution_ops.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/safety/execution_ops.py -------------------------------------------------------------------------------- /srlnbc/agents/safety/mixin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/safety/mixin.py -------------------------------------------------------------------------------- /srlnbc/agents/safety/ppo_barrier/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/agents/safety/ppo_barrier/ppo_barrier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/safety/ppo_barrier/ppo_barrier.py -------------------------------------------------------------------------------- /srlnbc/agents/safety/ppo_barrier/ppo_barrier_tf_policy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/safety/ppo_barrier/ppo_barrier_tf_policy.py -------------------------------------------------------------------------------- /srlnbc/agents/safety/ppo_lagrangian/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/agents/safety/ppo_lagrangian/ppo_lagrangian.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/safety/ppo_lagrangian/ppo_lagrangian.py -------------------------------------------------------------------------------- /srlnbc/agents/safety/ppo_lagrangian/ppo_lagrangian_tf_policy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/agents/safety/ppo_lagrangian/ppo_lagrangian_tf_policy.py -------------------------------------------------------------------------------- /srlnbc/env/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/env/car_brake.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/car_brake.py -------------------------------------------------------------------------------- /srlnbc/env/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/config.py -------------------------------------------------------------------------------- /srlnbc/env/metadrive_intersection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/metadrive_intersection.py -------------------------------------------------------------------------------- /srlnbc/env/metadrive_rules.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/metadrive_rules.py -------------------------------------------------------------------------------- /srlnbc/env/metadrive_singleton.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/metadrive_singleton.py -------------------------------------------------------------------------------- /srlnbc/env/metadrive_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/metadrive_utils.py -------------------------------------------------------------------------------- /srlnbc/env/my_metadrive.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/my_metadrive.py -------------------------------------------------------------------------------- /srlnbc/env/register.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/register.py -------------------------------------------------------------------------------- /srlnbc/env/simple_safety_gym.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/simple_safety_gym.py -------------------------------------------------------------------------------- /srlnbc/env/unicycle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/unicycle.py -------------------------------------------------------------------------------- /srlnbc/env/xmls/point.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/env/xmls/point.xml -------------------------------------------------------------------------------- /srlnbc/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/models/safety_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/models/safety_model.py -------------------------------------------------------------------------------- /srlnbc/models/tf/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/models/tf/fcnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/models/tf/fcnet.py -------------------------------------------------------------------------------- /srlnbc/models/tf/misc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/models/tf/misc.py -------------------------------------------------------------------------------- /srlnbc/models/tf/safety_certificate_fcnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/models/tf/safety_certificate_fcnet.py -------------------------------------------------------------------------------- /srlnbc/models/tf/safety_fcnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/models/tf/safety_fcnet.py -------------------------------------------------------------------------------- /srlnbc/models/tf/safety_statewise_fcnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/models/tf/safety_statewise_fcnet.py -------------------------------------------------------------------------------- /srlnbc/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /srlnbc/utils/path.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/utils/path.py -------------------------------------------------------------------------------- /srlnbc/utils/tune.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjyyxx/srlnbc/HEAD/srlnbc/utils/tune.py --------------------------------------------------------------------------------