This commit is contained in:
zhm-real
2020-06-20 14:02:48 -07:00
parent 26479d8f2f
commit ef784b90ab
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="025aff36-a6aa-4945-ab7e-b2c625055f47" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../Stochastic Shortest Path/value_iteration.py" beforeDir="false" afterPath="$PROJECT_DIR$/../Stochastic Shortest Path/value_iteration.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 41 KiB

+3 -3
View File
@@ -21,9 +21,8 @@ class Value_iteration:
self.gamma = 0.9 # discount factor
self.obs = env.obs_map() # position of obstacles
self.lose = env.lose_map() # position of lose states
self.name1 = "value_iteration, e=" + str(self.e) \
+ ", gamma=" + str(self.gamma)
self.name2 = "convergence of error, e=" + str(self.e)
self.name1 = "value_iteration, gamma=" + str(self.gamma)
self.name2 = "converge process, e=" + str(self.e)
def iteration(self):
@@ -114,6 +113,7 @@ class Value_iteration:
plt.plot(diff, color='#808080', marker='o')
plt.title(self.name2, fontdict=None)
plt.xlabel('iterations')
plt.ylabel('difference of successive iterations')
plt.grid('on')
plt.show()