pacai.student.learning_questions
1# pylint: disable=invalid-name 2 3def question_2() -> tuple[float, float]: 4 """ 5 Question 2. 6 7 Modify ONLY ONE of the following variables when answering this question. 8 """ 9 10 discount = 0.9 11 noise = 0.2 12 13 return discount, noise 14 15def question_3a() -> tuple[float, float, float] | None: 16 """ 17 Question 3A. 18 19 Modify any of these three options. 20 If the requested scenario is not possible, 21 return just `None`. 22 """ 23 24 discount = 0.9 25 noise = 0.2 26 living_reward = 0.0 27 28 # If the requested scenario is not possible, return None. 29 # return None 30 31 return discount, noise, living_reward 32 33def question_3b() -> tuple[float, float, float] | None: 34 """ 35 Question 3B. 36 37 Modify any of these three options. 38 If the requested scenario is not possible, 39 return just `None`. 40 """ 41 42 discount = 0.9 43 noise = 0.2 44 living_reward = 0.0 45 46 # If the requested scenario is not possible, return None. 47 # return None 48 49 return discount, noise, living_reward 50 51def question_3c() -> tuple[float, float, float] | None: 52 """ 53 Question 3C. 54 55 Modify any of these three options. 56 If the requested scenario is not possible, 57 return just `None`. 58 """ 59 60 discount = 0.9 61 noise = 0.2 62 living_reward = 0.0 63 64 # If the requested scenario is not possible, return None. 65 # return None 66 67 return discount, noise, living_reward 68 69def question_3d() -> tuple[float, float, float] | None: 70 """ 71 Question 3D. 72 73 Modify any of these three options. 74 If the requested scenario is not possible, 75 return just `None`. 76 """ 77 78 discount = 0.9 79 noise = 0.2 80 living_reward = 0.0 81 82 # If the requested scenario is not possible, return None. 83 # return None 84 85 return discount, noise, living_reward 86 87def question_3e() -> tuple[float, float, float] | None: 88 """ 89 Question 3E. 90 91 Modify any of these three options. 92 If the requested scenario is not possible, 93 return just `None`. 94 """ 95 96 discount = 0.9 97 noise = 0.2 98 living_reward = 0.0 99 100 # If the requested scenario is not possible, return None. 101 # return None 102 103 return discount, noise, living_reward 104 105def question_5() -> tuple[float, float]: 106 """ 107 Question 5. 108 109 Modify any of these two options. 110 If the requested scenario is not possible, 111 return just `None`. 112 """ 113 114 exploration_rate = 0.3 115 learning_rate = 0.5 116 117 # If the requested scenario is not possible, return None. 118 # return None 119 120 return exploration_rate, learning_rate 121 122def main() -> int: 123 """ Print the answers to all the questions. """ 124 125 questions = [ 126 question_2, 127 question_3a, 128 question_3b, 129 question_3c, 130 question_3d, 131 question_3e, 132 question_5, 133 ] 134 135 print('Answers to analysis questions:') 136 for question in questions: 137 response = question() 138 print(f" {question.__name__.title():<11}: {str(response)}") 139 140 return 0 141 142if (__name__ == '__main__'): 143 main()
4def question_2() -> tuple[float, float]: 5 """ 6 Question 2. 7 8 Modify ONLY ONE of the following variables when answering this question. 9 """ 10 11 discount = 0.9 12 noise = 0.2 13 14 return discount, noise
Question 2.
Modify ONLY ONE of the following variables when answering this question.
16def question_3a() -> tuple[float, float, float] | None: 17 """ 18 Question 3A. 19 20 Modify any of these three options. 21 If the requested scenario is not possible, 22 return just `None`. 23 """ 24 25 discount = 0.9 26 noise = 0.2 27 living_reward = 0.0 28 29 # If the requested scenario is not possible, return None. 30 # return None 31 32 return discount, noise, living_reward
Question 3A.
Modify any of these three options.
If the requested scenario is not possible,
return just None
.
34def question_3b() -> tuple[float, float, float] | None: 35 """ 36 Question 3B. 37 38 Modify any of these three options. 39 If the requested scenario is not possible, 40 return just `None`. 41 """ 42 43 discount = 0.9 44 noise = 0.2 45 living_reward = 0.0 46 47 # If the requested scenario is not possible, return None. 48 # return None 49 50 return discount, noise, living_reward
Question 3B.
Modify any of these three options.
If the requested scenario is not possible,
return just None
.
52def question_3c() -> tuple[float, float, float] | None: 53 """ 54 Question 3C. 55 56 Modify any of these three options. 57 If the requested scenario is not possible, 58 return just `None`. 59 """ 60 61 discount = 0.9 62 noise = 0.2 63 living_reward = 0.0 64 65 # If the requested scenario is not possible, return None. 66 # return None 67 68 return discount, noise, living_reward
Question 3C.
Modify any of these three options.
If the requested scenario is not possible,
return just None
.
70def question_3d() -> tuple[float, float, float] | None: 71 """ 72 Question 3D. 73 74 Modify any of these three options. 75 If the requested scenario is not possible, 76 return just `None`. 77 """ 78 79 discount = 0.9 80 noise = 0.2 81 living_reward = 0.0 82 83 # If the requested scenario is not possible, return None. 84 # return None 85 86 return discount, noise, living_reward
Question 3D.
Modify any of these three options.
If the requested scenario is not possible,
return just None
.
88def question_3e() -> tuple[float, float, float] | None: 89 """ 90 Question 3E. 91 92 Modify any of these three options. 93 If the requested scenario is not possible, 94 return just `None`. 95 """ 96 97 discount = 0.9 98 noise = 0.2 99 living_reward = 0.0 100 101 # If the requested scenario is not possible, return None. 102 # return None 103 104 return discount, noise, living_reward
Question 3E.
Modify any of these three options.
If the requested scenario is not possible,
return just None
.
106def question_5() -> tuple[float, float]: 107 """ 108 Question 5. 109 110 Modify any of these two options. 111 If the requested scenario is not possible, 112 return just `None`. 113 """ 114 115 exploration_rate = 0.3 116 learning_rate = 0.5 117 118 # If the requested scenario is not possible, return None. 119 # return None 120 121 return exploration_rate, learning_rate
Question 5.
Modify any of these two options.
If the requested scenario is not possible,
return just None
.
123def main() -> int: 124 """ Print the answers to all the questions. """ 125 126 questions = [ 127 question_2, 128 question_3a, 129 question_3b, 130 question_3c, 131 question_3d, 132 question_3e, 133 question_5, 134 ] 135 136 print('Answers to analysis questions:') 137 for question in questions: 138 response = question() 139 print(f" {question.__name__.title():<11}: {str(response)}") 140 141 return 0
Print the answers to all the questions.