Skip to content

Commit

Permalink
feat: support multigoal evaluation
Browse files Browse the repository at this point in the history
feat: support multigoal evaluation
  • Loading branch information
Gaiejj authored Aug 24, 2023
2 parents e2e51b3 + f120a7f commit 80dcd06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Firstly, each algorithm is implemented strictly according to the original paper

- [Overview of Algorithms](#overview-of-algorithms)
- [Supported Environments: Safety-Gymnasium](#supported-environments-safety-gymnasium)
- [Gymnasium-based Environments](#gymnasium-based-environments)
- [Isaac Gym-based Environments](#isaac-gym-based-environments)
- [Selected Tasks](#selected-tasks)
- [Pre-requisites](#pre-requisites)
Expand Down Expand Up @@ -75,7 +74,6 @@ Here we provide a table of Safe RL algorithms that the benchmark includes.

For more details, please refer to [Safety-Gymnasium](https://github.com/PKU-Alignment/safety-gymnasium).

### Gymnasium-based Environments

<table border="1">
<thead>
Expand Down Expand Up @@ -145,7 +143,12 @@ For more details, please refer to [Safety-Gymnasium](https://github.com/PKU-Alig
</tbody>
</table>

**note**: Safe velocity tasks support both single-agent and multi-agent algorithms, while safe navigation tasks only support single-agent algorithms currently.
**note**:

- **Safe Velocity** and **Safe Isaac Gym** tasks support both single-agent and multi-agent algorithms.
- **Safe Navigation** tasks support single-agent algorithms.
- **Safe MultiGoal** tasks support multi-agent algorithms.
- **Safe Isaac Gym** tasks do not support evaluation after training yet.


### Isaac Gym-based Environments
Expand Down
2 changes: 1 addition & 1 deletion safepo/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def single_runs_eval(eval_dir, eval_episodes):
config_path = eval_dir + '/config.json'
config = json.load(open(config_path, 'r'))
env = config['task'] if 'task' in config.keys() else config['env_name']
if env in multi_agent_velocity_map.keys():
if env in multi_agent_velocity_map.keys() or env in multi_agent_goal_tasks:
reward, cost = eval_multi_agent(eval_dir, eval_episodes)
else:
reward, cost = eval_single_agent(eval_dir, eval_episodes)
Expand Down

0 comments on commit 80dcd06

Please sign in to comment.