def example(): task = MyOwnTask() env = CausalWorld(task=task, enable_visualization=True) env.reset() for _ in range(2000): for _ in range(10): obs, reward, done, info = \ env.step(env.action_space.sample()) random_intervention_dict = env.do_single_random_intervention() env.close()
def example(): task = generate_task(task_generator_id='picking') env = CausalWorld(task=task, enable_visualization=True) env.reset() for _ in range(50): random_intervention_dict, success_signal, obs = \ env.do_single_random_intervention() print("The random intervention performed is ", random_intervention_dict) for i in range(100): obs, reward, done, info = env.step(env.action_space.sample()) env.close()