-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hervé Frezza-Buet
authored and
Hervé Frezza-Buet
committed
Jan 7, 2015
1 parent
7368721
commit b5e9631
Showing
515 changed files
with
55,879 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
<!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"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=9"/> | ||
<meta name="generator" content="Doxygen 1.8.3.1"/> | ||
<title>rl-3.00.03: example-001-001-cliff-walking-sarsa.cc</title> | ||
<link href="tabs.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="jquery.js"></script> | ||
<script type="text/javascript" src="dynsections.js"></script> | ||
<link href="search/search.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="search/search.js"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { searchBox.OnSelectItem(0); }); | ||
</script> | ||
<link href="doxygen.css" rel="stylesheet" type="text/css" /> | ||
</head> | ||
<body> | ||
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> | ||
<div id="titlearea"> | ||
<table cellspacing="0" cellpadding="0"> | ||
<tbody> | ||
<tr style="height: 56px;"> | ||
<td style="padding-left: 0.5em;"> | ||
<div id="projectname">rl-3.00.03 | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end header part --> | ||
<!-- Generated by Doxygen 1.8.3.1 --> | ||
<script type="text/javascript"> | ||
var searchBox = new SearchBox("searchBox", "search",false,'Search'); | ||
</script> | ||
<div id="navrow1" class="tabs"> | ||
<ul class="tablist"> | ||
<li><a href="index.html"><span>Main Page</span></a></li> | ||
<li><a href="namespaces.html"><span>Namespaces</span></a></li> | ||
<li><a href="annotated.html"><span>Classes</span></a></li> | ||
<li><a href="files.html"><span>Files</span></a></li> | ||
<li><a href="examples.html"><span>Examples</span></a></li> | ||
<li> | ||
<div id="MSearchBox" class="MSearchBoxInactive"> | ||
<span class="left"> | ||
<img id="MSearchSelect" src="search/mag_sel.png" | ||
onmouseover="return searchBox.OnSearchSelectShow()" | ||
onmouseout="return searchBox.OnSearchSelectHide()" | ||
alt=""/> | ||
<input type="text" id="MSearchField" value="Search" accesskey="S" | ||
onfocus="searchBox.OnSearchFieldFocus(true)" | ||
onblur="searchBox.OnSearchFieldFocus(false)" | ||
onkeyup="searchBox.OnSearchFieldChange(event)"/> | ||
</span><span class="right"> | ||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> | ||
</span> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
</div><!-- top --> | ||
<!-- window showing the filter options --> | ||
<div id="MSearchSelectWindow" | ||
onmouseover="return searchBox.OnSearchSelectShow()" | ||
onmouseout="return searchBox.OnSearchSelectHide()" | ||
onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a></div> | ||
|
||
<!-- iframe showing the search results (closed by default) --> | ||
<div id="MSearchResultsWindow"> | ||
<iframe src="javascript:void(0)" frameborder="0" | ||
name="MSearchResults" id="MSearchResults"> | ||
</iframe> | ||
</div> | ||
|
||
<div class="header"> | ||
<div class="headertitle"> | ||
<div class="title">example-001-001-cliff-walking-sarsa.cc</div> </div> | ||
</div><!--header--> | ||
<div class="contents"> | ||
<div class="fragment"><div class="line"><span class="comment">/* This file is part of rl-lib</span></div> | ||
<div class="line"><span class="comment"> *</span></div> | ||
<div class="line"><span class="comment"> * Copyright (C) 2010, Supelec</span></div> | ||
<div class="line"><span class="comment"> *</span></div> | ||
<div class="line"><span class="comment"> * Author : Herve Frezza-Buet and Matthieu Geist</span></div> | ||
<div class="line"><span class="comment"> *</span></div> | ||
<div class="line"><span class="comment"> * Contributor :</span></div> | ||
<div class="line"><span class="comment"> *</span></div> | ||
<div class="line"><span class="comment"> * This library is free software; you can redistribute it and/or</span></div> | ||
<div class="line"><span class="comment"> * modify it under the terms of the GNU General Public</span></div> | ||
<div class="line"><span class="comment"> * License (GPL) as published by the Free Software Foundation; either</span></div> | ||
<div class="line"><span class="comment"> * version 3 of the License, or any later version.</span></div> | ||
<div class="line"><span class="comment"> * </span></div> | ||
<div class="line"><span class="comment"> * This library is distributed in the hope that it will be useful,</span></div> | ||
<div class="line"><span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div> | ||
<div class="line"><span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div> | ||
<div class="line"><span class="comment"> * General Public License for more details.</span></div> | ||
<div class="line"><span class="comment"> * </span></div> | ||
<div class="line"><span class="comment"> * You should have received a copy of the GNU General Public</span></div> | ||
<div class="line"><span class="comment"> * License along with this library; if not, write to the Free Software</span></div> | ||
<div class="line"><span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span></div> | ||
<div class="line"><span class="comment"> *</span></div> | ||
<div class="line"><span class="comment"> * Contact : Herve.Frezza-Buet@supelec.fr Matthieu.Geist@supelec.fr</span></div> | ||
<div class="line"><span class="comment"> *</span></div> | ||
<div class="line"><span class="comment"> */</span></div> | ||
<div class="line"></div> | ||
<div class="line"></div> | ||
<div class="line"><span class="preprocessor">#include <<a class="code" href="a00070.html">rl.hpp</a>></span></div> | ||
<div class="line"></div> | ||
<div class="line"><span class="keyword">typedef</span> <a name="_a0"></a><a class="code" href="a00050.html">rl::problem::cliff_walking::Cliff<20,6></a> Cliff;</div> | ||
<div class="line"><span class="keyword">typedef</span> <a name="_a1"></a><a class="code" href="a00051.html">rl::problem::cliff_walking::Simulator<Cliff></a> Simulator;</div> | ||
<div class="line"></div> | ||
<div class="line"><span class="comment">// Definition of Reward, S, A, SA, Transition and TransitionSet.</span></div> | ||
<div class="line"><span class="preprocessor">#include "example-defs-transition.hpp"</span></div> | ||
<div class="line"></div> | ||
<div class="line"><span class="comment">// Definition a tabular parametrization of the Q-Value.</span></div> | ||
<div class="line"><span class="preprocessor">#include "example-defs-tabular-cliff.hpp"</span></div> | ||
<div class="line"></div> | ||
<div class="line"></div> | ||
<div class="line"><span class="comment">// Let us define the parameters.</span></div> | ||
<div class="line"><span class="preprocessor">#define paramGAMMA .99</span></div> | ||
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define paramALPHA .05</span></div> | ||
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define paramEPSILON .2</span></div> | ||
<div class="line"><span class="preprocessor"></span></div> | ||
<div class="line"><span class="comment">// This stores pieces of codes shared by our example experiments.</span></div> | ||
<div class="line"><span class="preprocessor">#include "example-defs-cliff-experiments.hpp"</span></div> | ||
<div class="line"></div> | ||
<div class="line"><span class="keyword">using namespace </span>std::placeholders;</div> | ||
<div class="line"></div> | ||
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[]) {</div> | ||
<div class="line"> gsl_vector* theta = gsl_vector_alloc(TABULAR_Q_CARDINALITY);</div> | ||
<div class="line"> gsl_vector_set_zero(theta);</div> | ||
<div class="line"></div> | ||
<div class="line"> <span class="keyword">auto</span> q = std::bind(q_parametrized,theta,_1,_2);</div> | ||
<div class="line"> <span class="keyword">auto</span> critic = rl::gsl::sarsa<S,A>(theta,</div> | ||
<div class="line"> paramGAMMA,paramALPHA,</div> | ||
<div class="line"> q_parametrized,</div> | ||
<div class="line"> grad_q_parametrized);</div> | ||
<div class="line"></div> | ||
<div class="line"> make_experiment(critic,q);</div> | ||
<div class="line"> gsl_vector_free(theta);</div> | ||
<div class="line"> <span class="keywordflow">return</span> 0;</div> | ||
<div class="line">}</div> | ||
</div><!-- fragment --> </div><!-- contents --> | ||
<!-- start footer part --> | ||
<hr class="footer"/><address class="footer"><small> | ||
Generated by  <a href="http://www.doxygen.org/index.html"> | ||
<img class="footer" src="doxygen.png" alt="doxygen"/> | ||
</a> 1.8.3.1 | ||
</small></address> | ||
</body> | ||
</html> |
Oops, something went wrong.