From 638418ccef01cbf450339c2296e209b570a89974 Mon Sep 17 00:00:00 2001 From: Nam-dada <12011815@mail.sustech.edu.cn> Date: Mon, 14 Apr 2025 10:00:57 +0800 Subject: [PATCH] update test --- .../mujoco_playground/swimmer6.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) rename src/tensorneat/mjx_swimmer.py => examples/mujoco_playground/swimmer6.py (94%) diff --git a/src/tensorneat/mjx_swimmer.py b/examples/mujoco_playground/swimmer6.py similarity index 94% rename from src/tensorneat/mjx_swimmer.py rename to examples/mujoco_playground/swimmer6.py index 0ca1e17..4084838 100644 --- a/src/tensorneat/mjx_swimmer.py +++ b/examples/mujoco_playground/swimmer6.py @@ -1,13 +1,16 @@ - from tensorneat.pipeline import Pipeline from tensorneat.algorithm.neat import NEAT -from tensorneat.genome import DefaultGenome, BiasNode, DefaultConn,DefaultMutation +from tensorneat.genome import DefaultGenome, BiasNode, DefaultConn, DefaultMutation -from problem.rl import MujocoEnv +from tensorneat.problem.rl import MujocoEnv from tensorneat.common import ACT, AGG import jax + + def random_sample_policy(randkey, obs): return jax.random.uniform(randkey, (8,), minval=-1.0, maxval=1.0) + + if __name__ == "__main__": pipeline = Pipeline( algorithm=NEAT( @@ -55,4 +58,4 @@ if __name__ == "__main__": state = pipeline.setup() # print(state) # run until terminate - state, best = pipeline.auto_run(state) \ No newline at end of file + state, best = pipeline.auto_run(state)