Reputation: 1090
This is the URL that a link leads to:
http://127.0.0.1/define/91/915/ans/%20%20%20%20%20%20%20%20%20%20%3Cp%3E%20Figure %3Ca%20href=%22node16.html#fig:bandits-graphs"> 2.1</a> compares a greedy method with two <img width="13" height="16" align="BOTTOM" border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/img2.png" alt="$\varepsilon $">-greedy methods (<img border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/inimgtmp113.png" width="57" height="11"> and <img border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/inimgtmp114.png" width="49" height="11">), as described above, on the 10-armed testbed. Both methods formed their action-value estimates using the sample-average technique. The upper graph shows the increase in expected reward with experience. The greedy method improved slightly faster than the other methods at the very beginning, but then leveled off at a lower level. It achieved a reward per step of only about 1, compared with the best possible of about 1.55 on this testbed. The greedy method performs significantly <span class="highlight-wrapper"><span class="highlight" data-id="idtobesetinview"><span class="html">texthtmlgoeshere</span></span>worse<span id="noblankspace"></span></span> in the long run because it often gets stuck performing suboptimal actions. The lower graph shows that the greedy method found the optimal action in only approximately one-third of the tasks. In the other two-thirds, its initial samples of the optimal action were disappointing, and it never returned to it. The <img width="13" height="16" align="BOTTOM" border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/img2.png" alt="$\varepsilon $">-greedy methods eventually perform better because they continue to explore, and to improve their chances of recognizing the optimal action. The <img border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/inimgtmp115.png" width="49" height="11"> method explores more, and usually finds the optimal action earlier, but never selects it more than 91% of the time. The <img border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/inimgtmp116.png" width="57" height="11"> method improves more slowly, but eventually performs better than the <img border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/inimgtmp117.png" width="49" height="11"> method on both performance measures. It is also possible to reduce <img width="13" height="16" align="BOTTOM" border="0" src="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/img2.png" alt="$\varepsilon $"> over time to try to get the best of both high and low values. </p><p></p> /quabl/worse/cques/Worsexqmx/highlight/worse
But Django throws a 404 and accepts only the first few characters upto:
http://127.0.0.1/define/91/915/ans/%20%20%20%20%20%20%20%20%20%20%3Cp%3E%20Figure %3Ca%20href=%22node16.html
The url binding is:
url(r'^define/(?P<post_id>\w+)/(?P<simpler_id>\w+)/ans/(?P<answer_part>[\w|\W]+)/quabl/(?P<quabl>[\w|\W]*)/cques/(?P<cques>[\w|\W]*)/highlight/(?P<highlightx>[\w|\W]*)/$', define),
The next character is a '#'. Is this an encoding problem? How to fix this?
Upvotes: 0
Views: 61
Reputation: 15084
You are using \w which stands for "word character" and will not match everything. If you want create a to create a regular expression that will match all characters you need to use something like .*
(check this answer https://stackoverflow.com/a/11384464/119071)
Now, I have to notice that I am not very fond of how you have specified your url patters. If I count correctly, you are defining 6 (six !) url parameters which can get any value ! Instead of doing this, I recommend adding only the required parts to your URL (probably only post_id
and simpler_id
) and all other parameters should be passed (correctly encoded) through the query (like this path?param1=foo¶m2=bar
)
Upvotes: 1