# Path: babyai/levels/levelgen.py
# class RejectSampling(Exception):
# class RoomGridLevel(RoomGrid):
# class LevelGen(RoomGridLevel):
#     def __init__(
#         self,
#         room_size=8,
#         **kwargs
#     ):
#     def reset(self, **kwargs):
#     def step(self, action):
#     def update_objs_poss(self, instr=None):
#     def _gen_grid(self, width, height):
#     def validate_instrs(self, instr):
#     def gen_mission(self):
#     def level_name(self):
#     def gym_id(self):
#     def num_navs_needed(self, instr):
#     def open_all_doors(self):
#     def check_objs_reachable(self, raise_exc=True):
#     def __init__(
#         self,
#         room_size=8,
#         num_rows=3,
#         num_cols=3,
#         num_dists=18,
#         locked_room_prob=0.5,
#         locations=True,
#         unblocking=True,
#         implicit_unlock=True,
#         action_kinds=['goto', 'pickup', 'open', 'putnext'],
#         instr_kinds=['action', 'and', 'seq'],
#         seed=None
#     ):
#     def gen_mission(self):
#     def add_locked_room(self):
#     def rand_obj(self, types=OBJ_TYPES, colors=COLOR_NAMES, max_tries=100):
#     def rand_instr(
#         self,
#         action_kinds,
#         instr_kinds,
#         depth=0
#     ):
# def register_levels(module_name, globals):
# def test():


import os
import sys
import babyai.utils as utils
import re
from subprocess import call
from babyai.levels import level_dict
"""
Evaluate all models in a storage directory.

In order to use this script make sure to add baby-ai-game/scripts to the $PATH
environment variable.

Sample usage:
evaluate_all_models.py --episodes 200 --argmax
"""



# List of all levels ordered by length of the level name from longest to shortest

# Path: babyai/levels/levelgen.py
# class RejectSampling(Exception):
# class RoomGridLevel(RoomGrid):
# class LevelGen(RoomGridLevel):
#     def __init__(
#         self,
#         room_size=8,
#         **kwargs
#     ):
#     def reset(self, **kwargs):
#     def step(self, action):
#     def update_objs_poss(self, instr=None):
#     def _gen_grid(self, width, height):
#     def validate_instrs(self, instr):
#     def gen_mission(self):
#     def level_name(self):
#     def gym_id(self):
#     def num_navs_needed(self, instr):
#     def open_all_doors(self):
#     def check_objs_reachable(self, raise_exc=True):
#     def __init__(
#         self,
#         room_size=8,
#         num_rows=3,
#         num_cols=3,
#         num_dists=18,
#         locked_room_prob=0.5,
#         locations=True,
#         unblocking=True,
#         implicit_unlock=True,
#         action_kinds=['goto', 'pickup', 'open', 'putnext'],
#         instr_kinds=['action', 'and', 'seq'],
#         seed=None
#     ):
#     def gen_mission(self):
#     def add_locked_room(self):
#     def rand_obj(self, types=OBJ_TYPES, colors=COLOR_NAMES, max_tries=100):
#     def rand_instr(
#         self,
#         action_kinds,
#         instr_kinds,
#         depth=0
#     ):
# def register_levels(module_name, globals):
# def test():


# Path: scripts/evaluate_all_models.py
import os
import sys
import babyai.utils as utils
import re
from subprocess import call
from babyai.levels import level_dict

"""
Evaluate all models in a storage directory.

In order to use this script make sure to add baby-ai-game/scripts to the $PATH
environment variable.

Sample usage:
evaluate_all_models.py --episodes 200 --argmax
"""



# List of all levels ordered by length of the level name from longest to shortest

LEVELS = sorted(list(level_dict.keys()), key=len)[::-1]