iclbench.environments package
Subpackages
- iclbench.environments.baba_is_ai package
- iclbench.environments.babyai_text package
- Submodules
- iclbench.environments.babyai_text.clean_lang_wrapper module
BabyAITextCleanLangWrapperBabyAITextCleanLangWrapper.__init__()BabyAITextCleanLangWrapper.default_actionBabyAITextCleanLangWrapper.get_prompt()BabyAITextCleanLangWrapper.get_stats()BabyAITextCleanLangWrapper.get_text_action()BabyAITextCleanLangWrapper.interleaving_tokenBabyAITextCleanLangWrapper.reset()BabyAITextCleanLangWrapper.step()
- Module contents
- iclbench.environments.craftax package
- iclbench.environments.crafter package
- Submodules
- iclbench.environments.crafter.env module
CrafterLanguageWrapperCrafterLanguageWrapper.__init__()CrafterLanguageWrapper.default_iterCrafterLanguageWrapper.default_stepsCrafterLanguageWrapper.get_stats()CrafterLanguageWrapper.get_text_action()CrafterLanguageWrapper.process_obs()CrafterLanguageWrapper.reset()CrafterLanguageWrapper.step()CrafterLanguageWrapper.update_progress()
describe_act()describe_env()describe_frame()describe_inventory()describe_loc()describe_status()get_player_idx()rotation_matrix()
- Module contents
- iclbench.environments.minihack package
- iclbench.environments.nle package
- iclbench.environments.textworld package
Submodules
iclbench.environments.env_wrapper module
- class iclbench.environments.env_wrapper.EnvWrapper(env, env_name, task_name)[source]
Bases:
Wrapper- __init__(env, env_name, task_name)[source]
Wraps an environment to allow a modular transformation of the
step()andreset()methods.- Parameters:
env – The environment to wrap
- property actions
- property max_steps
Module contents
- class iclbench.environments.Strings(values, seed=None)[source]
Bases:
Space- __init__(values, seed=None)[source]
Constructor of
Space.- Parameters:
shape (Optional[Sequence[int]]) – If elements of the space are numpy arrays, this should specify their shape.
dtype (Optional[Type | str]) – If elements of the space are numpy arrays, this should specify their dtype.
seed – Optionally, you can use this argument to seed the RNG that is used to sample from the space
- iclbench.environments.make_env(env_name, task, config)[source]
Creates and initializes an environment based on the specified environment name and task.
This function supports multiple environment types, each with its own configuration requirements. The function will return a wrapped environment suitable for use with agents in the context of the ICLBench framework.
- Parameters:
env_name (str) – The name of the environment to create. Supported values include: - “nle” - “minihack” - “babyai” - “crafter” - “craftax” - “textworld” - “babaisai”
task (str) – The specific task to be performed within the environment.
config (Config) – An object containing configuration settings, which must include environment-specific keys such as: - envs.nle_kwargs (dict): Arguments specific to the NLE environment. - envs.minihack_kwargs (dict): Arguments specific to the MiniHack environment. - envs.babyai_kwargs (dict): Arguments specific to the BabyAI environment. - envs.crafter_kwargs (dict): Arguments specific to the Crafter environment. - envs.craftax_kwargs (dict): Arguments specific to the Craftax environment. - envs.textworld_kwargs (dict): Arguments specific to the TextWorld environment. - envs.babaisai_kwargs (dict): Arguments specific to the Baba Is AI environment.
- Returns:
- A wrapped environment instance that includes language processing capabilities
and task-specific functionality.
- Return type:
- Raises:
ValueError – If the provided environment name is not recognized.