TheMTank / cups-rl

Customisable Unified Physical Simulations (CUPS) for Reinforcement Learning. Experiments run on the ai2thor environment (http://ai2thor.allenai.org/) e.g. using A3C, RainbowDQN and A3C_GA (Gated Attention multi-modal fusion) for Task-Oriented Language Grounding (tasks specified by natural language instructions) e.g. "Pick up the Cup or else"

Home Page:http://www.themtank.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make random action in rainbow

zyzhang1130 opened this issue · comments

Hi, may I ask is it possible to make a sequence of random actions by adding a line of code in main.py of Rainbow?

instead of line 161 action = dqn.act(state) you can put an if statement and do
action = env.action_space.sample() for whatever condition you want. But not sure why you would want to do this since rainbow has roughly random actions at the start of training.

If rainbow keeps doing the same action you should tune your noisy layer parameters.

Thank you. It is because initially my idea is to reset the agent's position in the room once certain conditions are met. However, since the currently wrapper does not support teleport, I compromised my strategy. Instead of returning to the original position, I make the agent take a random walk so that it has no way of tracing back to its position when the conditions are met in an analytic way. But if you know an alternative of resetting the agent's position do let me know. Thanks!