Example #1
0
 def select_additional_infos(self) -> EnvInfos:
     request_infos = EnvInfos()
     request_infos.has_won = True
     request_infos.has_lost = True
     request_infos.description = True
     request_infos.inventory = True
     request_infos.command_templates = True
     request_infos.entities = False
     request_infos.admissible_commands = False
     return request_infos
Example #2
0
    def request_infos() -> Optional[EnvInfos]:
        """Request the infos the agent expects from the environment

        Returns:
            request_infos: EnvInfos"""
        request_infos = EnvInfos()
        request_infos.description = True
        request_infos.inventory = True
        request_infos.entities = True
        request_infos.verbs = True
        request_infos.admissible_commands = True
        request_infos.command_templates = True
        request_infos.max_score = True
        return request_infos
Example #3
0
def get_infos(eval=True, recipe=True, walkthrough=True):
    request_infos = \
        EnvInfos(verbs=True, moves=True, inventory=True, description=True,
                 objective=True, intermediate_reward=True,
                 policy_commands=True, max_score=True,
                 admissible_commands=True, last_action=True, game=True,
                 facts=True, entities=True,
                 won=True, lost=True, location=True)
    request_infos.verbs = True
    request_infos.extras = []
    if recipe:
        request_infos.extras += ['recipe']
    if walkthrough:
        request_infos.extras += ['walkthrough']
    if eval:
        request_infos.max_score = True
        request_infos.admissible_commands = True
        request_infos.command_templates = True
    return request_infos