Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enquiry Regarding Running random agent using build file #29

Open
Acejoy opened this issue Apr 25, 2024 · 0 comments
Open

Enquiry Regarding Running random agent using build file #29

Acejoy opened this issue Apr 25, 2024 · 0 comments

Comments

@Acejoy
Copy link

Acejoy commented Apr 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant