Question: Create a new . py file called SpaceCapsuleEnvironment.py and build a model that keeps the space capsule in the safety range for as long as
Create a new py file called SpaceCapsuleEnvironment.py and build a model that keeps the space capsule in the safety range for as long as possible using SARSA algorithm.
Create a SpaceEnv class with the following function
initself an initilization function that defines the initial values for the environment.
stepself action a step function that provides the next observation state of the system, a reward, and stopping criteria done given an action.
resetself a function to reset the values of the environment after each epsiode.
Discretize the alignment range in evenly spaced numbers over the interval cm and cm You should use the function nplinspace. Also, update the function getStateobservation
Run SARSA algorithm with the SpaceEnv you've just created. You should save the plot containing the results.
Change the learning rate parameter ALPHA to and then to and discuss your findings.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
