From 03a431c8d96e9d92cdb61fbcfd337bfd53ff6ce9 Mon Sep 17 00:00:00 2001 From: Mikel Date: Thu, 27 Jun 2024 13:04:19 +0200 Subject: [PATCH] Delete test.py --- test.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 5cc05a1a3..000000000 --- a/test.py +++ /dev/null @@ -1,36 +0,0 @@ -import time - -from craftium import CraftiumEnv - -import numpy as np -import matplotlib.pyplot as plt - -if __name__ == "__main__": - env = CraftiumEnv( - env_dir="craftium-envs/chop-tree", - # render_mode="human", - # max_timesteps=15, - ) - iters = 100 - - observation, info = env.reset() - - start = time.time() - for i in range(iters): - plt.clf() - plt.imshow(np.transpose(observation, (1, 0, 2))) - plt.pause(1e-7) - - # action = env.action_space.sample() - action = dict() - observation, reward, terminated, truncated, _info = env.step(action) - - print(i, reward, terminated, truncated) - - if terminated or truncated: - observation, info = env.reset() - - end = time.time() - print(f"** {iters} frames in {end-start}s => {(end-start)/iters} per frame") - - env.close()