Skip to content

Enquiry Regarding Running random agent using build file #29

Description

@Acejoy

Hello all,
First of all , great project and thanks for the sharing the code. I am currently interested in training the PickupTask using a3c or rainbow. I am facing issue while running random agent using the build file mentioned in readme([https://drive.google.com/open?id=1UlmAnLuDVBYEiw_xPsGcbuXQTAiNwo8E](build file)). I extracted it and put it in gym_ai2thor/build_files/.
The agent doesn't move or take any action after instantiation of controller.

It contains:

  • build_bowls_vs_cups_fp1_v_0.1.x86_64 (file)
  • build_bowls_vs_cups_fp1_v_0.1_Data (folder)

the code I am running is as follows:

import time

import gym
from gym_ai2thor.envs.ai2thor_env import AI2ThorEnv

N_EPISODES = 3


if __name__ == '__main__':
    config_dict = {
        'max_episode_length': 200,
        "build_file_name": "pickup_build_bowl/build_bowls_vs_cups_fp1_v_0.1.x86_64"
    }
    env = AI2ThorEnv(config_dict=config_dict)
    max_episode_length = env.task.max_episode_length
    for episode in range(N_EPISODES):
        start = time.time()
        state = env.reset()
        for step_num in range(max_episode_length):
            action = env.action_space.sample()
            state, reward, done, _ = env.step(action)
            if done:
                break

            if step_num + 1 > 0 and (step_num + 1) % 100 == 0:
                print('Episode: {}. Step: {}/{}. Time taken: {:.3f}s'.format(episode + 1,
                                         (step_num + 1), max_episode_length, time.time() - start))
                start = time.time()

this is the output on the terminal :

home/srinjoym/Documents/cups-rl/gym_ai2thor/utils.py:62: UserWarning: Key: build_file_name already in config file with value False. Overwriting with value: pickup_build_bowl/build_bowls_vs_cups_fp1_v_0.1.x86_64
  warnings.warn('Key: {} already in config file with value {}. '
Build file path at: /home/srinjoym/Documents/cups-rl/gym_ai2thor/build_files/pickup_build_bowl/build_bowls_vs_cups_fp1_v_0.1.x86_64
Found path: /home/srinjoym/Documents/cups-rl/gym_ai2thor/build_files/pickup_build_bowl/build_bowls_vs_cups_fp1_v_0.1.x86_64
Mono path[0] = '/home/srinjoym/Documents/cups-rl/gym_ai2thor/build_files/pickup_build_bowl/build_bowls_vs_cups_fp1_v_0.1_Data/Managed'
Mono config path = '/home/srinjoym/Documents/cups-rl/gym_ai2thor/build_files/pickup_build_bowl/build_bowls_vs_cups_fp1_v_0.1_Data/Mono/etc'
Preloaded 'ScreenSelector.so'
Display 0 '0': 1920x1080 (primary device).
Logging to /home/srinjoym/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-Thor/Player.log
1/3
Resetting environment and starting new episode

and the frame of ai2thor simulator is as such:

Screenshot from 2024-04-25 22-08-38

Any help is greatly appreciated. Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions