forked from david-abel/simple_rl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmdp.html
403 lines (357 loc) · 28.3 KB
/
mdp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="Python">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>simple_rl.mdp package — simple_rl v0.801 documentation</title>
<link rel="stylesheet" href="static/classic.css" type="text/css" />
<link rel="stylesheet" href="static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="static/documentation_options.js"></script>
<script type="text/javascript" src="static/jquery.js"></script>
<script type="text/javascript" src="static/underscore.js"></script>
<script type="text/javascript" src="static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="simple_rl.planning package" href="planning.html" />
<link rel="prev" title="simple_rl.experiments package" href="experiments.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="planning.html" title="simple_rl.planning package"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="experiments.html" title="simple_rl.experiments package"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">simple_rl v0.801 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="code.html" accesskey="U">Auto Generated Documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="simple-rl-mdp-package">
<h1>simple_rl.mdp package<a class="headerlink" href="#simple-rl-mdp-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-simple_rl.mdp.MDPClass">
<span id="simple-rl-mdp-mdpclass-module"></span><h2>simple_rl.mdp.MDPClass module<a class="headerlink" href="#module-simple_rl.mdp.MDPClass" title="Permalink to this headline">¶</a></h2>
<p>MDPClass.py: Contains the MDP Class.</p>
<dl class="class">
<dt id="simple_rl.mdp.MDPClass.MDP">
<em class="property">class </em><code class="descclassname">simple_rl.mdp.MDPClass.</code><code class="descname">MDP</code><span class="sig-paren">(</span><em>actions</em>, <em>transition_func</em>, <em>reward_func</em>, <em>init_state</em>, <em>gamma=0.99</em>, <em>step_cost=0</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Abstract class for a Markov Decision Process.</p>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.end_of_instance">
<code class="descname">end_of_instance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.end_of_instance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.end_of_instance" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.execute_agent_action">
<code class="descname">execute_agent_action</code><span class="sig-paren">(</span><em>action</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.execute_agent_action"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.execute_agent_action" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>action (str)</dd>
<dt>Returns:</dt>
<dd>(tuple: <float,State>): reward, State</dd>
<dt>Summary:</dt>
<dd>Core method of all of simple_rl. Facilitates interaction
between the MDP and an agent.</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_actions">
<code class="descname">get_actions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_actions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_actions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_curr_state">
<code class="descname">get_curr_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_curr_state"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_curr_state" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_gamma">
<code class="descname">get_gamma</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_gamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_gamma" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_init_state">
<code class="descname">get_init_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_init_state"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_init_state" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_num_state_feats">
<code class="descname">get_num_state_feats</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_num_state_feats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_num_state_feats" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_parameters">
<code class="descname">get_parameters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_parameters" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>(dict) key=param_name (str) --> val=param_val (object).</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_reward_func">
<code class="descname">get_reward_func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_reward_func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_reward_func" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_slip_prob">
<code class="descname">get_slip_prob</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_slip_prob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_slip_prob" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.get_transition_func">
<code class="descname">get_transition_func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.get_transition_func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.get_transition_func" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.reset">
<code class="descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.reset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.set_gamma">
<code class="descname">set_gamma</code><span class="sig-paren">(</span><em>new_gamma</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.set_gamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.set_gamma" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.set_slip_prob">
<code class="descname">set_slip_prob</code><span class="sig-paren">(</span><em>slip_prob</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.set_slip_prob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.set_slip_prob" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPClass.MDP.set_step_cost">
<code class="descname">set_step_cost</code><span class="sig-paren">(</span><em>new_step_cost</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPClass.html#MDP.set_step_cost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPClass.MDP.set_step_cost" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-simple_rl.mdp.MDPDistributionClass">
<span id="simple-rl-mdp-mdpdistributionclass-module"></span><h2>simple_rl.mdp.MDPDistributionClass module<a class="headerlink" href="#module-simple_rl.mdp.MDPDistributionClass" title="Permalink to this headline">¶</a></h2>
<p>MDPDistributionClass.py: Contains the MDP Distribution Class.</p>
<dl class="class">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution">
<em class="property">class </em><code class="descclassname">simple_rl.mdp.MDPDistributionClass.</code><code class="descname">MDPDistribution</code><span class="sig-paren">(</span><em>mdp_prob_dict</em>, <em>horizon=0</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Class for distributions over MDPs.</p>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_actions">
<code class="descname">get_actions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_actions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_actions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_all_mdps">
<code class="descname">get_all_mdps</code><span class="sig-paren">(</span><em>prob_threshold=0</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_all_mdps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_all_mdps" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>prob_threshold (float)</dd>
<dt>Returns:</dt>
<dd>(list): Contains all mdps in the distribution with Pr. > @prob_threshold.</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_average_reward_func">
<code class="descname">get_average_reward_func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_average_reward_func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_average_reward_func" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_gamma">
<code class="descname">get_gamma</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_gamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_gamma" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Notes:</dt>
<dd>Not all MDPs in the distribution are guaranteed to share gamma.</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_horizon">
<code class="descname">get_horizon</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_horizon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_horizon" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_init_state">
<code class="descname">get_init_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_init_state"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_init_state" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Notes:</dt>
<dd>Not all MDPs in the distribution are guaranteed to share init states.</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_mdps">
<code class="descname">get_mdps</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_mdps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_mdps" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_num_mdps">
<code class="descname">get_num_mdps</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_num_mdps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_num_mdps" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_parameters">
<code class="descname">get_parameters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_parameters" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>(dict) key=param_name (str) --> val=param_val (object).</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_prob_of_mdp">
<code class="descname">get_prob_of_mdp</code><span class="sig-paren">(</span><em>mdp</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_prob_of_mdp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_prob_of_mdp" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_reward_func">
<code class="descname">get_reward_func</code><span class="sig-paren">(</span><em>avg=True</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.get_reward_func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.get_reward_func" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.remove_mdp">
<code class="descname">remove_mdp</code><span class="sig-paren">(</span><em>mdp</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.remove_mdp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.remove_mdp" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>(MDP)</dd>
<dt>Summary:</dt>
<dd>Removes @mdp from self.mdp_prob_dict and recomputes the distribution.</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.remove_mdps">
<code class="descname">remove_mdps</code><span class="sig-paren">(</span><em>mdp_list</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.remove_mdps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.remove_mdps" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>(list): Contains MDP instances.</dd>
<dt>Summary:</dt>
<dd>Removes each mdp in @mdp_list from self.mdp_prob_dict and recomputes the distribution.</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.sample">
<code class="descname">sample</code><span class="sig-paren">(</span><em>k=1</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.sample"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.sample" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>k (int)</dd>
<dt>Returns:</dt>
<dd>(List of MDP): Samples @k mdps without replacement.</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.MDPDistributionClass.MDPDistribution.set_gamma">
<code class="descname">set_gamma</code><span class="sig-paren">(</span><em>new_gamma</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#MDPDistribution.set_gamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.MDPDistribution.set_gamma" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="simple_rl.mdp.MDPDistributionClass.main">
<code class="descclassname">simple_rl.mdp.MDPDistributionClass.</code><code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/MDPDistributionClass.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.MDPDistributionClass.main" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-simple_rl.mdp.StateClass">
<span id="simple-rl-mdp-stateclass-module"></span><h2>simple_rl.mdp.StateClass module<a class="headerlink" href="#module-simple_rl.mdp.StateClass" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="simple_rl.mdp.StateClass.State">
<em class="property">class </em><code class="descclassname">simple_rl.mdp.StateClass.</code><code class="descname">State</code><span class="sig-paren">(</span><em>data=[]</em>, <em>is_terminal=False</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/StateClass.html#State"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.StateClass.State" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Abstract State class</p>
<dl class="method">
<dt id="simple_rl.mdp.StateClass.State.features">
<code class="descname">features</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/StateClass.html#State.features"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.StateClass.State.features" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Summary</dt>
<dd>Used by function approximators to represent the state.
Override this method in State subclasses to have functiona
approximators use a different set of features.</dd>
<dt>Returns:</dt>
<dd>(iterable)</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.StateClass.State.get_data">
<code class="descname">get_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/StateClass.html#State.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.StateClass.State.get_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.StateClass.State.get_num_feats">
<code class="descname">get_num_feats</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/StateClass.html#State.get_num_feats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.StateClass.State.get_num_feats" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.StateClass.State.is_terminal">
<code class="descname">is_terminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/StateClass.html#State.is_terminal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.StateClass.State.is_terminal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="simple_rl.mdp.StateClass.State.set_terminal">
<code class="descname">set_terminal</code><span class="sig-paren">(</span><em>is_term=True</em><span class="sig-paren">)</span><a class="reference internal" href="modules/simple_rl/mdp/StateClass.html#State.set_terminal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#simple_rl.mdp.StateClass.State.set_terminal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-simple_rl.mdp">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-simple_rl.mdp" title="Permalink to this headline">¶</a></h2>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">simple_rl.mdp package</a><ul>
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-simple_rl.mdp.MDPClass">simple_rl.mdp.MDPClass module</a></li>
<li><a class="reference internal" href="#module-simple_rl.mdp.MDPDistributionClass">simple_rl.mdp.MDPDistributionClass module</a></li>
<li><a class="reference internal" href="#module-simple_rl.mdp.StateClass">simple_rl.mdp.StateClass module</a></li>
<li><a class="reference internal" href="#module-simple_rl.mdp">Module contents</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="experiments.html"
title="previous chapter">simple_rl.experiments package</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="planning.html"
title="next chapter">simple_rl.planning package</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="sources/mdp.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="planning.html" title="simple_rl.planning package"
>next</a> |</li>
<li class="right" >
<a href="experiments.html" title="simple_rl.experiments package"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">simple_rl v0.801 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="code.html" >Auto Generated Documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2018, David Abel.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.8.
</div>
</body>
</html>