Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Now, let's see what happens if we try that same control _ sequence on a version of the environment where the wheels are a little
Now, let's see what happens if we try that same controlsequence on a version of the environment where the wheels are a little bit slippery,
so our simple unicycle model does not describe the true system perfectly.
class NoisyUnicycleUnicycle:
Same as Unicycle but add process noise at each step.""
definitself
processnoiselimitsnparray
:
self.processnoiselimits processnoiselimits
super :( minmin,maxmax,minmin,maxmax
def stepself currentstate, action, dt npndarray:
Add process noise to the parent kinematics model."
nextstate superstep currentstate, action,
perturbednextstate nextstate nprandom. uniformlowself.processnoiselimits highself.processnoiselimits
return perturbednextstate
This class we wrote for you will make it so you can't perfectly measure the system's state. It adds random noise to the obs that the env
returns at each step:
from gymnasium import ObservationWrapper
class NoisyStateFeedbackWrapperObservationWrapper:
def self env, sensornoiselimitsnparray :
self. sensornoiselimits sensornoiselimits
super :env
def observationself observation: dict npndarray:
obs observation state nprandom.uniformlowself.sensornoiselimits highself.sensornoiselimits
return obs
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started