SofaDefrost / SofaGym

Machine Learning framework for Sofa
68 stars 10 forks source link

Add StateInitializer component to environment #46

Closed samuelmyoussef closed 7 months ago

samuelmyoussef commented 10 months ago

Added a StateInitializer class to the CartPole environment to randomly initialize the simulation state at the beginning of each episode.

EtienneMenager commented 8 months ago

Just one thing, does every scene have a StateInitializer (if you add it in simulate.py)?

samuelmyoussef commented 8 months ago

For the moment, it's only the CartPole scene so I put it inside an exception handler with try except in simulate.py, so if it doesn't find it in the scene it will just print an error and continue normally.