If one had to identify one idea as central and novel to reinforcement learning, it would undoubtedly be temporal-difference(TD) learning. TD learning is a combination of Monte Carlo ideas and dynamic programming (DP) ideas.
Like Monte Carlo methods, TD methods can learn directly from raw experience without a model of the environment’s dynamics.
Like DP, TD methods update estimates based in part on other learned estimates, without waiting for a final outcome.
In TD, instead of getting an estimated value function at the end of multiple episodes, we can use the incremental mean approximation to update the value function after each step.Backup tree for value iteration with the TD approach. TD samples a single step ahead as shown with red.Going back to the example of crossing the room optimally, we take one step towards the goal and the we bootstrap the value function of the state we were in from an estimated return for the remaining trajectory. We repeat this as we go along effectively adjusting the value estimate of the starting state from the true returns we have experienced up to now, gradually grounding the whole estimate as we approach the goal.Two value approximation methods: MC (left), TD (right) as converging in their predictions of the value of each of the states in the x-axis. The example is from a hypothetical commute from office back home. In MC you have to wait until the episode ended (reach the goal) to update the value function at each state of the trajectory. In contrast, TD updates the value function at each state based on the estimates of the total travel time. The goal state is “arrive home”, while the reward function is time.As you can notice in the figure above the solid arrows in the MC case, adjust the predicted value of each state to the actual return while in the TD case the value prediction happens every step in the way. We call TD for this reason an online learning scheme. Another characteristic of TD is that it does not depend on reaching the goal, it continuously learns. MC does depend on the goal and therefore is episodic.
This is important in many mission critical applications e.g robotics where you dont wait to “crash” to apply corrections to your state value based on what you experienced.
Instead as data comes sequentially and continuously, the system must adapt quickly - TD methods (e.g. TD(0), SARSA, Q-learning) update the value function or policy after each time step, making them naturally online and incremental.In addition, TD’s use of local estimates (immediate reward + next state value) helps stabilize learning in the presence of noise from sensors and actuators.
Mathematically, instead of using the true return, Gt, something that it is possible in the MC as we are trully experiencing the world along a trajectory, TD uses a (biased) estimated return called the TD target: Rt+1+γV(St+1) approximating the value function as:V(St)=V(St)+α(Rt+1+γV(St+1)−V(St))The difference below is called the TD approximation error,δt=Rt+1+γ(V(St+1)−V(St))
The TD approach of the previous section, can be extended to multiple steps. Instead of a single look ahead step we can take multiple successive look ahead steps (n), we will call this TD(n) for now, and at the end of the n-th step, we use the value function at that state to backup and get the value function at the state where we started. The trees below are indicative of the process.Effectively after n-steps our return will be:Gt:t+n=Rt+1+γRt+2+γ2Rt+3+...+γn−1Rt+n+γnVt+n−1(St+n)and the TD(n) learning equation becomesV(St)=V(St)+α(Gt:t+n−V(St))We now define the so called λ-return that combines all n-step returns Gt:t+n via the geometric weighting function shown below:Gt(λ)=(1−λ)∑n=1T−(t+1)λn−1Gt:t+n+(1−λ)λT−(t+1)Gtλ weighting function for TD(λ)the TD(n) learning equation becomesV(St)=V(St)+α(Gtλ−V(St))When λ=0 we get TD(0) learning (the 1-step TD), while when λ=1 we get learning that is roughly equivalent to MC. Certainly it is convenient to learn one guess from the next, without waiting for an actual outcome, but can we still guarantee convergence to the correct answer? Happily, the answer is yes. For any fixed policy π, TD(0) has been proved to converge to vπ, in the mean for a constant step-size parameter if it is sufficiently small. However in terms of data efficiency there is no clear winner at this point.Key references: (Rafati & Noelle, 2019; Szepesvári et al., 2010; Yang et al., 2019; Tu & Recht, 2018; Schulman et al., 2017)
Rafati, J., Noelle, D. (2019). Learning sparse representations in reinforcement learning. arXiv [cs.LG].
Schulman, J., Wolski, F., Dhariwal, P., Radford, A., Klimov, O. (2017). Proximal Policy Optimization Algorithms. arXiv [cs.LG].
Szepesvári, C., Cochran, J., Cox, L., Keskinocak, P., Kharoufeh, J., et al. (2010). Reinforcement Learning Algorithms for MDPs. Wiley Encyclopedia of Operations Research and Management Science.
Tu, S., Recht, B. (2018). The Gap Between Model-Based and Model-Free Methods on the Linear Quadratic Regulator: An Asymptotic Viewpoint. arXiv [cs.LG].
Yang, Y., Caluwaerts, K., Iscen, A., Zhang, T., Tan, J., et al. (2019). Data efficient reinforcement learning for legged robots. arXiv [cs.LG].
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"aegean.ai","description":"Engineering AI Agents - Comprehensive courses on deep learning, computer vision, robotics, and AI systems","colors":{"primary":"#2196C8","light":"#5CADD8","dark":"#1565B0"},"logo":{"light":"https://mintcdn.com/aegeanaiinc/ai8d4zdsUnwq_5J6/logo.png?fit=max\u0026auto=format\u0026n=ai8d4zdsUnwq_5J6\u0026q=85\u0026s=fe5e281c1569f8468ff85157bd7d9dc3","dark":"https://mintcdn.com/aegeanaiinc/ai8d4zdsUnwq_5J6/logo-dark.png?fit=max\u0026auto=format\u0026n=ai8d4zdsUnwq_5J6\u0026q=85\u0026s=6a455ae676293280c72ec43f2ac544b4","href":"/"},"favicon":"https://mintcdn.com/aegeanaiinc/0dr6ajwzGFHGACv0/favicon.png?fit=max\u0026auto=format\u0026n=0dr6ajwzGFHGACv0\u0026q=85\u0026s=c0348644679947ce971abb8037adb632","appearance":{"default":"system","strict":false},"navbar":{"links":[{"href":"https://github.com/aegean-ai","label":"GitHub"},{"href":"https://www.linkedin.com/company/aegean-ai/","label":"LinkedIn"}]},"footer":{"socials":{"github":"https://github.com/aegean-ai","linkedin":"https://www.linkedin.com/company/aegean-ai","x":"https://x.com/aegeanai"},"links":[{"header":"Products","items":[{"label":"Auraison","href":"https://n8n.aegeanai.com"}]},{"header":"Courses","items":[{"label":"AI Foundations","href":"/courses/ai/index"},{"label":"Computer Vision","href":"/courses/cv/index"},{"label":"Robotics","href":"/courses/robotics/index"}]},{"header":"Resources","items":[{"label":"Use These Docs","href":"/use-these-docs"},{"label":"GitHub","href":"https://github.com/aegean-ai"},{"label":"Blog","href":"/blog"},{"label":"RSS Feed","href":"/rss.xml"}]},{"header":"Company","items":[{"label":"About","href":"/about"},{"label":"Careers","href":"/careers/virtual-internships/index"},{"label":"Contact","href":"https://forms.gle/W3z4NTC883mNY5Kr8"},{"label":"Privacy Policy","href":"/privacy"}]}]},"styling":{"eyebrows":"section","latex":true},"integrations":{"ga4":{"measurementId":"G-EHRC22H65X"},"posthog":{"apiKey":"phc_J5w6esvspb1vh8O3MegWoaUYiq1zzWYuv7GTfjgui6F","sessionRecording":true}},"contextual":{"options":["claude","perplexity","mcp","cursor","vscode",{"title":"Report an issue","description":"Tell us about an error on this page","icon":"bug","href":{"base":"https://github.com/aegean-ai/eaia-feedback/issues/new","query":[{"key":"template","value":"page-issue.yml"},{"key":"page","value":"$path"}]}}],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"aegeanaiinc","hasAudioNarration":false,"actualSubdomain":"aegeanaiinc","customDomains":["aegean.ai"],"gitSource":{"type":"github","owner":"aegean-ai","repo":"eaia","deployBranch":"prod","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad92a50d495d58d39db645f","collectionId":"95d0db87-6d4e-467e-b329-8939d6748db9","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad92a50d495d58d39db645f"},"feedback":{"agentFeedback":true},"entitlements":{},"buildId":"6ad92a50d495d58d39db645f","clientVersion":"0.0.3926","searchFilterCounts":[{"language":"default","tag":"Book","count":266},{"language":"default","tag":"Perception","count":55},{"language":"default","tag":"Products","count":52},{"language":"default","tag":"Courses","count":42},{"language":"default","tag":"Applications","count":39},{"language":"default","tag":"Robotics Systems","count":29},{"language":"default","tag":"Manufacturing QC","count":27},{"language":"default","tag":"LLM","count":24},{"language":"default","tag":"Foundations","count":22},{"language":"default","tag":"Physical AI","count":21}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"[class*=Header],[class*=Navbar],[class*=header],[class*=navbar],header,nav{padding-top:1.5rem!important;padding-bottom:1.5rem!important}[class*=Brand] img,[class*=Logo] img,[class*=brand] img,[class*=logo] img,a[href=\"/\"] img:first-child,a[href=\"/\"]>img,header img[alt*=logo i],header img[src*=logo i],nav img[alt*=logo i],nav img[src*=logo i]{height:40px!important;max-height:40px!important;width:auto!important}#navbar #sidebar-title,[class*=SiteName],[class*=site-name],[class*=siteName],a[href=\"/\"]>span,header #sidebar-title,header [class*=Logo] span,header [class*=brand] span,header [class*=logo] span,nav [class*=Logo] span,nav [class*=logo] span{font-size:1.35rem!important;font-weight:600!important}a code,a[href] code{color:inherit!important;text-decoration:none!important;padding:0!important}.callout a,.callout b,.callout em,.callout i,.callout p,.callout strong,[class*=callout] a,[class*=callout] b,[class*=callout] em,[class*=callout] i,[class*=callout] p,[class*=callout] strong{font-size:inherit!important;color:inherit!important}.callout li,.callout ol,.callout ul,[class*=callout] li,[class*=callout] ol,[class*=callout] ul{font-size:inherit!important;color:inherit!important;line-height:inherit!important}.mermaid{text-align:center;display:flex;justify-content:center}.mermaid .labelBkg{background-color:#fff!important;border:1px solid #2f6868!important;border-radius:4px!important;padding:0 4px!important}.mermaid .labelBkg:not(:has(p)){display:none!important}.mermaid .edgeLabel{color:#1c3c3c!important}.dark .mermaid .labelBkg{background-color:#1c3c3c!important;border-color:#84c4c0!important}.dark .mermaid .edgeLabel{color:#84c4c0!important}.mermaid .node circle,.mermaid .node polygon,.mermaid .node rect{fill:none!important;stroke:#9ca3af!important;stroke-width:2px!important;rx:12px;ry:12px;transition:stroke .2s ease,filter .2s ease,stroke-width .2s ease}.mermaid .node .nodeLabel,.mermaid .node .nodeLabel p{font-family:inherit!important}.mermaid .node .nodeLabel p{color:#fff!important}.mermaid .node:hover circle,.mermaid .node:hover polygon,.mermaid .node:hover rect,.mermaid a:hover .node circle,.mermaid a:hover .node polygon,.mermaid a:hover .node rect{stroke:#2196c8!important;stroke-width:3px!important;filter:drop-shadow(0 0 8px rgba(33,150,200,.5));cursor:pointer}.mermaid .cluster rect{rx:12px!important;ry:12px!important}.content table td,.content table th,.markdown table td,.markdown table th,.prose table td,.prose table th,[class*=prose] table td,[class*=prose] table th,article table td,article table th{vertical-align:middle!important;line-height:1.5!important}#pagination{display:none}#banner a{color:inherit!important;text-decoration:none!important}.compact-first-col [data-table-wrapper]{overflow-x:visible!important}.compact-first-col table{table-layout:auto!important;width:100%!important}.compact-first-col table td,.compact-first-col table th{min-width:0!important}.compact-first-col table td:first-child,.compact-first-col table th:first-child{width:1%!important;white-space:nowrap!important}.home-page~:is(.callout, [data-callout-type]){display:none!important}#sidebar .sidebar-group-header,#sidebar button[class*=group],#sidebar-content .sidebar-group-header,#sidebar-content button,.sidebar-group-header,[class*=SidebarGroupHeader],[class*=sidebar-group-header],[class^=sidebar_group]>button,[class^=sidebar_group]>div:first-child,aside button{font-size:14px!important;font-weight:400!important;letter-spacing:normal!important;line-height:1.4!important;padding-top:.5rem!important;padding-bottom:.25rem!important;margin:0!important;text-transform:none!important}.sidebar-group:first-child .sidebar-group-header{padding-top:0!important}.sidebar-nav-group-divider{display:none!important}.sidebar-group{margin:0!important;padding:0!important}#sidebar-content{gap:0!important}#sidebar svg,.sidebar-group svg{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important}.sidebar-group-header svg,.sidebar-group-icon svg{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important}.dark .prose img,.dark [class*=Frame] img,.dark article img,.dark figure img{background-color:#f8f9fa!important;border-radius:8px!important;padding:12px!important}.dark .prose img.no-dark-bg,.dark article img.no-dark-bg,.dark img.no-dark-bg{background-color:transparent!important;border-radius:0!important;padding:0!important}.preview-card{display:flex;flex-direction:column;background:rgba(255,255,255,.03);border-radius:16px;overflow:hidden;transition:background .2s ease,box-shadow .2s ease;text-decoration:none!important;color:inherit!important}.preview-card:hover{background:rgba(255,255,255,.06);box-shadow:0 4px 20px rgba(0,0,0,.3)}.preview-card iframe{width:100%;border:0;border-radius:8px 8px 0 0;display:block}.preview-card-caption{padding:14px 18px 16px}.preview-card-caption h3{font-size:17px!important;font-weight:600!important;margin:0 0 6px!important;line-height:1.4!important}.preview-card-caption p{font-size:13px!important;opacity:.6;margin:0!important;line-height:1.5!important}.preview-card-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.preview-card-tag{background:rgba(255,255,255,.05);border:0;border-radius:16px;padding:2px 10px;font-size:11px;cursor:default}.preview-card{border:1px solid rgba(0,0,0,.08)}.dark .preview-card{border:1px solid rgba(255,255,255,.06)}.dark .preview-card img{background-color:transparent!important;padding:0!important}.preview-card-tag{color:rgba(0,0,0,.4);background:rgba(0,0,0,.05)}.dark .preview-card-tag{color:rgba(255,255,255,.5);background:rgba(255,255,255,.05)}.katex,.katex *{line-height:normal}.katex .delimsizing.size1{font-size:1em}.katex .delimsizing.size2{font-size:1.2em}.katex .delimsizing.size3{font-size:1.8em}.katex .delimsizing.size4{font-size:2.4em}.katex-display>.katex{overflow-y:hidden}.page-authors{display:flex;flex-wrap:wrap;gap:2px 18px;margin:-4px 0 28px;font-size:14px;line-height:1.5;opacity:.6}.page-author-affiliation::before{content:\" · \"}"}],"page":{"pagePath":"aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference","slug":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference","pageMetadata":{"title":"Temporal Difference (TD) Prediction","sidebarTitle":"Temporal Difference (TD) Prediction","sidebar":"sidebar-rl","description":null,"href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,annotation:`annotation`,em:`em`,hr:`hr`,li:`li`,math:`math`,mi:`mi`,mn:`mn`,mo:`mo`,mrow:`mrow`,msub:`msub`,msubsup:`msubsup`,msup:`msup`,p:`p`,semantics:`semantics`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Callout,Heading,Note,OptimizedImage}=_components;if(!Callout)_missingMdxReference(`Callout`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`If one had to identify one idea as central and novel to reinforcement learning, it would undoubtedly be temporal-difference(TD) learning. TD learning is a combination of Monte Carlo ideas and dynamic programming (DP) ideas.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Like Monte Carlo methods, TD methods can learn directly from raw experience without a model of the environment’s dynamics.`}),`\n`,_jsx(_components.li,{children:`Like DP, TD methods update estimates based in part on other learned estimates, without waiting for a final outcome.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`In TD, instead of getting an estimated value function at the end of multiple episodes, we can use the incremental mean approximation to update the value function after each step.`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png?fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=9e08ddcee9987a12a1081f5b6a63b125`,alt:``,\"data-og-width\":`763`,width:`763`,\"data-og-height\":`390`,height:`390`,\"data-path\":`aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png?w=280\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=98948b4a88fde1dbbcbaf465fc30c817 280w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png?w=560\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=577dd97104e317758c6681441ee8b1e1 560w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png?w=840\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=4ed7f786fbd77349ac38492628898fcd 840w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png?w=1100\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=4c716812de2f28f346f6608d7500c206 1100w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png?w=1650\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=dc8871e09545d33c9104587f2eeb6262 1650w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-value-iteration-tree.png?w=2500\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=307794690e92820ca2880e5be5a296a1 2500w`}),`\n`,_jsx(_components.p,{children:`Backup tree for value iteration with the TD approach. TD samples a single step ahead as shown with red.`}),`\n`,_jsxs(_components.p,{children:[`Going back to the example of crossing the room optimally, we take one step towards the goal and the we `,_jsx(_components.em,{children:`bootstrap`}),` the value function of the state we were in from an estimated return for the remaining trajectory. We repeat this as we go along effectively adjusting the value estimate of the starting state from the true returns we have experienced up to now, `,_jsx(_components.em,{children:`gradually grounding`}),` the whole estimate as we approach the goal.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png?fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=34d35446da811aa32fef5d8a1193fbc1`,alt:``,\"data-og-width\":`735`,width:`735`,\"data-og-height\":`291`,height:`291`,\"data-path\":`aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png?w=280\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=fcf756780bcb01154714a244da75eda9 280w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png?w=560\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=26e30c9c6a1564fda716c418cf11ab4b 560w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png?w=840\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=d5850fe2a1704771f493e0100b0ad945 840w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png?w=1100\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=6ac91f635d95bacc72f0985132a9558b 1100w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png?w=1650\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=5e9f20c7ab273a26a787ddd5e4126e1d 1650w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/td-driving-to-work-example.png?w=2500\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=3be2f3096a45142a7942f4bfb5db89d6 2500w`}),`\n`,_jsx(_components.p,{children:`Two value approximation methods: MC (left), TD (right) as converging in their predictions of the value of each of the states in the x-axis. The example is from a hypothetical commute from office back home. In MC you have to wait until the episode ended (reach the goal) to update the value function at each state of the trajectory. In contrast, TD updates the value function at each state based on the estimates of the total travel time. The goal state is “arrive home”, while the reward function is time.`}),`\n`,_jsxs(_components.p,{children:[`As you can notice in the figure above the solid arrows in the MC case, adjust the predicted value of each state to the `,_jsx(_components.em,{children:`actual`}),` return while in the TD case the value prediction happens every step in the way. We call TD for this reason an `,_jsx(_components.em,{children:`online`}),` learning scheme. Another characteristic of TD is that it does not depend on reaching the goal, it `,_jsx(_components.em,{children:`continuously`}),` learns. MC does depend on the goal and therefore is `,_jsx(_components.em,{children:`episodic`}),`.`]}),`\n`,_jsxs(Note,{children:[_jsx(_components.p,{children:`This is important in many mission critical applications e.g robotics where you dont wait to “crash” to apply corrections to your state value based on what you experienced.\nInstead as data comes sequentially and continuously, the system must adapt quickly - TD methods (e.g. TD(0), SARSA, Q-learning) update the value function or policy after each time step, making them naturally online and incremental.`}),_jsxs(_components.p,{children:[`In addition, TD’s use of `,_jsx(_components.strong,{children:`local`}),` estimates (immediate reward + next state value) helps stabilize learning in the presence of noise from sensors and actuators.`]})]}),`\n`,_jsxs(_components.p,{children:[`Mathematically, instead of using the `,_jsx(_components.em,{children:`true`}),` return, `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`G`}),_jsx(_components.mi,{children:`t`})]})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`G_t`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8333em`,verticalAlign:`-0.15em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]})]})})]}),`, something that it is possible in the MC as we are trully experiencing the world along a trajectory, TD uses a (biased) `,_jsx(_components.em,{children:`estimated`}),` return called the `,_jsx(_components.em,{children:`TD target`}),`: `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`R`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`γ`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`R_{t+1} + \\\\gamma V(S_{t+1})`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8917em`,verticalAlign:`-0.2083em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0077em`},children:`R`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0077em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0556em`},children:`γ`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`})]})]})]}),` approximating the value function as:`]}),`\n`,_jsx(_components.p,{children:_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`=`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`α`}),_jsxs(_components.mrow,{children:[_jsx(_components.mo,{fence:`true`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`R`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`γ`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{fence:`true`,children:`)`})]})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:` V(S_t) = V(S_t) + \\\\alpha \\\\left( R_{t+1} + \\\\gamma V(S_{t+1}) - V(S_t) \\\\right)`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0037em`},children:`α`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.1667em`}}),_jsxs(_components.span,{className:`minner`,children:[_jsx(_components.span,{className:`mopen delimcenter`,style:{top:`0em`},children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0077em`},children:`R`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0077em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0556em`},children:`γ`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`−`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mclose delimcenter`,style:{top:`0em`},children:`)`})]})]})]})]})}),`\n`,_jsxs(_components.p,{children:[`The difference below is called the `,_jsx(_components.em,{children:`TD approximation error`}),`,`]}),`\n`,_jsx(_components.p,{children:_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`δ`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{children:`=`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`R`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`γ`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{stretchy:`false`,children:`)`})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`\\\\delta_t = R_{t+1} + \\\\gamma (V(S_{t+1}) - V(S_t))`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8444em`,verticalAlign:`-0.15em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0379em`},children:`δ`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0379em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8917em`,verticalAlign:`-0.2083em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0077em`},children:`R`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0077em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0556em`},children:`γ`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`−`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`))`})]})]})]})}),`\n`,_jsxs(Heading,{level:`2`,id:`the-td`,children:[`The TD(`,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsx(_components.mi,{children:`λ`})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`\\\\lambda`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6944em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`})]})})]}),`)`]}),`\n`,_jsx(_components.p,{children:`The TD approach of the previous section, can be extended to multiple steps. Instead of a single look ahead step we can take multiple successive look ahead steps (n), we will call this TD(n) for now, and at the end of the n-th step, we use the value function at that state to backup and get the value function at the state where we started. The trees below are indicative of the process.`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png?fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=b9b138645bcc07e08a689d69d9865369`,alt:``,\"data-og-width\":`766`,width:`766`,\"data-og-height\":`590`,height:`590`,\"data-path\":`aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png?w=280\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=d97a74bb11225ee9b1d6176523f4c554 280w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png?w=560\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=92d462b2952cdec7e14b2d4d0db82085 560w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png?w=840\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=3f8076921af2b5481ea802b0eb156641 840w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png?w=1100\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=8c5c7b6fe74eaa09dc203e42d8f2858e 1100w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png?w=1650\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=816c69df8a4a5d0306bd0e7f99e91f1d 1650w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/n-step-TD.png?w=2500\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=0a24bc96a9e847c98de32cb4aa3de373 2500w`}),`\n`,_jsx(_components.p,{children:`Effectively after n-steps our return will be:`}),`\n`,_jsx(_components.p,{children:_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`G`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`:`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`n`})]})]}),_jsx(_components.mo,{children:`=`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`R`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`γ`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`R`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`2`})]})]}),_jsx(_components.mo,{children:`+`}),_jsxs(_components.msup,{children:[_jsx(_components.mi,{children:`γ`}),_jsx(_components.mn,{children:`2`})]}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`R`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`3`})]})]}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{mathvariant:`normal`,children:`.`}),_jsx(_components.mi,{mathvariant:`normal`,children:`.`}),_jsx(_components.mi,{mathvariant:`normal`,children:`.`}),_jsx(_components.mo,{children:`+`}),_jsxs(_components.msup,{children:[_jsx(_components.mi,{children:`γ`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`n`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mn,{children:`1`})]})]}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`R`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`n`})]})]}),_jsx(_components.mo,{children:`+`}),_jsxs(_components.msup,{children:[_jsx(_components.mi,{children:`γ`}),_jsx(_components.mi,{children:`n`})]}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`V`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`n`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mn,{children:`1`})]})]}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`n`})]})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`G_{t:t+n} = R_{t+1} + \\\\gamma R_{t+2} + \\\\gamma^2 R_{t+3} + ... + \\\\gamma^{n-1}R_{t+n} + \\\\gamma^{n} V_{t+n-1}(S_{t+n})`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8917em`,verticalAlign:`-0.2083em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mrel mtight`,children:`:`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8917em`,verticalAlign:`-0.2083em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0077em`},children:`R`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0077em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8917em`,verticalAlign:`-0.2083em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0556em`},children:`γ`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0077em`},children:`R`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0077em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`2`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1.0224em`,verticalAlign:`-0.2083em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0556em`},children:`γ`}),_jsx(_components.span,{className:`msupsub`,children:_jsx(_components.span,{className:`vlist-t`,children:_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.8141em`},children:_jsxs(_components.span,{style:{top:`-3.063em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mtight`,children:`2`})})]})})})})})]}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0077em`},children:`R`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0077em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`3`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6667em`,verticalAlign:`-0.0833em`}}),_jsx(_components.span,{className:`mord`,children:`...`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1.0224em`,verticalAlign:`-0.2083em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0556em`},children:`γ`}),_jsx(_components.span,{className:`msupsub`,children:_jsx(_components.span,{className:`vlist-t`,children:_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.8141em`},children:_jsxs(_components.span,{style:{top:`-3.063em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`}),_jsx(_components.span,{className:`mbin mtight`,children:`−`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})})})})})]}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0077em`},children:`R`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0077em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0556em`},children:`γ`}),_jsx(_components.span,{className:`msupsub`,children:_jsx(_components.span,{className:`vlist-t`,children:_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.6644em`},children:_jsxs(_components.span,{style:{top:`-3.063em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`})})})]})})})})})]}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.3011em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.2222em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`}),_jsx(_components.span,{className:`mbin mtight`,children:`−`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`})]})]})]})}),`\n`,_jsx(_components.p,{children:`and the TD(n) learning equation becomes`}),`\n`,_jsx(_components.p,{children:_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`=`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`α`}),_jsxs(_components.mrow,{children:[_jsx(_components.mo,{fence:`true`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`G`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`:`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`n`})]})]}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{fence:`true`,children:`)`})]})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`V(S_t) = V(S_t) + \\\\alpha \\\\left( G_{t:t+n} - V(S_t) \\\\right)`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0037em`},children:`α`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.1667em`}}),_jsxs(_components.span,{className:`minner`,children:[_jsx(_components.span,{className:`mopen delimcenter`,style:{top:`0em`},children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mrel mtight`,children:`:`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`−`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mclose delimcenter`,style:{top:`0em`},children:`)`})]})]})]})]})}),`\n`,_jsxs(_components.p,{children:[`We now define the so called `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsx(_components.mi,{children:`λ`})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`\\\\lambda`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6944em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`})]})})]}),`-return that `,_jsx(_components.em,{children:`combines`}),` all n-step returns `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`G`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`:`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`n`})]})]})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`G_{t:t+n}`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8917em`,verticalAlign:`-0.2083em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mrel mtight`,children:`:`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]})]})})]}),` via the geometric weighting function shown below:`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png?fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=fb5e038ecaf9af0f1851ddc442f8ffe4`,alt:``,\"data-og-width\":`1472`,width:`1472`,\"data-og-height\":`1002`,height:`1002`,\"data-path\":`aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png?w=280\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=48ae2a0b9dce122769e02c599053444d 280w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png?w=560\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=817f2952e7db8a44c2100b9ca9c8bb7e 560w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png?w=840\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=a69793306e0f744007680c17ec26b342 840w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png?w=1100\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=8b42dcb9d027d5ebd9bafb4384196c76 1100w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png?w=1650\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=60721ed0daa562334bf69e403628bc05 1650w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/TD-lambda-returns.png?w=2500\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=08e16798f279e71dda1beacd8f892f9c 2500w`}),`\n`,_jsx(_components.p,{children:_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsxs(_components.msubsup,{children:[_jsx(_components.mi,{children:`G`}),_jsx(_components.mi,{children:`t`}),_jsxs(_components.mrow,{children:[_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsx(_components.mi,{children:`λ`}),_jsx(_components.mo,{stretchy:`false`,children:`)`})]})]}),_jsx(_components.mo,{children:`=`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsx(_components.mn,{children:`1`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mi,{children:`λ`}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsxs(_components.msubsup,{children:[_jsx(_components.mo,{children:`∑`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`n`}),_jsx(_components.mo,{children:`=`}),_jsx(_components.mn,{children:`1`})]}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`T`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`}),_jsx(_components.mo,{stretchy:`false`,children:`)`})]})]}),_jsxs(_components.msup,{children:[_jsx(_components.mi,{children:`λ`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`n`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mn,{children:`1`})]})]}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`G`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`:`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`n`})]})]}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsx(_components.mn,{children:`1`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mi,{children:`λ`}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsxs(_components.msup,{children:[_jsx(_components.mi,{children:`λ`}),_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`T`}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mn,{children:`1`}),_jsx(_components.mo,{stretchy:`false`,children:`)`})]})]}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`G`}),_jsx(_components.mi,{children:`t`})]})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`G_t^{(\\\\lambda)} = (1-\\\\lambda) \\\\sum_{n=1}^{T-(t+1)} \\\\lambda^{n-1} G_{t:t+n} + (1-\\\\lambda) \\\\lambda^{T-(t+1)}G_t`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1.2906em`,verticalAlign:`-0.2458em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsxs(_components.span,{className:`vlist`,style:{height:`1.0448em`},children:[_jsxs(_components.span,{style:{top:`-2.4542em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]}),_jsxs(_components.span,{style:{top:`-3.2198em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mopen mtight`,children:`(`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`λ`}),_jsx(_components.span,{className:`mclose mtight`,children:`)`})]})})]})]}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2458em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsx(_components.span,{className:`mord`,children:`1`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`−`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1.3276em`,verticalAlign:`-0.2997em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.1667em`}}),_jsxs(_components.span,{className:`mop`,children:[_jsx(_components.span,{className:`mop op-symbol small-op`,style:{position:`relative`,top:`0em`},children:`∑`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsxs(_components.span,{className:`vlist`,style:{height:`1.0279em`},children:[_jsxs(_components.span,{style:{top:`-2.4003em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`}),_jsx(_components.span,{className:`mrel mtight`,children:`=`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]}),_jsxs(_components.span,{style:{top:`-3.2029em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,style:{marginRight:`0.1389em`},children:`T`}),_jsx(_components.span,{className:`mbin mtight`,children:`−`}),_jsx(_components.span,{className:`mopen mtight`,children:`(`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`}),_jsx(_components.span,{className:`mclose mtight`,children:`)`})]})})]})]}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2997em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.1667em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`λ`}),_jsx(_components.span,{className:`msupsub`,children:_jsx(_components.span,{className:`vlist-t`,children:_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.8141em`},children:_jsxs(_components.span,{style:{top:`-3.063em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`}),_jsx(_components.span,{className:`mbin mtight`,children:`−`}),_jsx(_components.span,{className:`mord mtight`,children:`1`})]})})]})})})})})]}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mrel mtight`,children:`:`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`n`})]})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.2083em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsx(_components.span,{className:`mord`,children:`1`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`−`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1.138em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`λ`}),_jsx(_components.span,{className:`msupsub`,children:_jsx(_components.span,{className:`vlist-t`,children:_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.888em`},children:_jsxs(_components.span,{style:{top:`-3.063em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsxs(_components.span,{className:`mord mtight`,children:[_jsx(_components.span,{className:`mord mathnormal mtight`,style:{marginRight:`0.1389em`},children:`T`}),_jsx(_components.span,{className:`mbin mtight`,children:`−`}),_jsx(_components.span,{className:`mopen mtight`,children:`(`}),_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`}),_jsx(_components.span,{className:`mbin mtight`,children:`+`}),_jsx(_components.span,{className:`mord mtight`,children:`1`}),_jsx(_components.span,{className:`mclose mtight`,children:`)`})]})})]})})})})})]}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]})]})]})]})}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png?fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=27d73280290a20d400f34989b4336e0e`,alt:`lambda-weighting-function`,\"data-og-width\":`752`,width:`752`,\"data-og-height\":`296`,height:`296`,\"data-path\":`aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png?w=280\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=87d5610d540f21a1635eb3eeada6b68a 280w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png?w=560\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=13189456a37ecc0bb2c163ef56a7c74b 560w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png?w=840\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=373219b71368959ca86c29bcaa57ddeb 840w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png?w=1100\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=3f976561600eab3c68987970634469e0 1100w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png?w=1650\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=7eefebf4bebebb5378b110c90990d7f8 1650w, https://mintcdn.com/aegeanaiinc/CFTczIUu7w-BdE7V/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/images/lambda-weighting-function.png?w=2500\u0026fit=max\u0026auto=format\u0026n=CFTczIUu7w-BdE7V\u0026q=85\u0026s=66dd6ae7ea2ee342cda997ab9f26a222 2500w`}),`\n`,_jsx(_components.p,{children:_jsxs(_components.em,{children:[_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsx(_components.mi,{children:`λ`})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`\\\\lambda`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6944em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`})]})})]}),` weighting function for TD(`,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsx(_components.mi,{children:`λ`})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`\\\\lambda`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6944em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`})]})})]}),`)`]})}),`\n`,_jsx(_components.p,{children:`the TD(n) learning equation becomes`}),`\n`,_jsx(_components.p,{children:_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`=`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{children:`+`}),_jsx(_components.mi,{children:`α`}),_jsxs(_components.mrow,{children:[_jsx(_components.mo,{fence:`true`,children:`(`}),_jsxs(_components.msubsup,{children:[_jsx(_components.mi,{children:`G`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mi,{children:`λ`})]}),_jsx(_components.mo,{children:`−`}),_jsx(_components.mi,{children:`V`}),_jsx(_components.mo,{stretchy:`false`,children:`(`}),_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`S`}),_jsx(_components.mi,{children:`t`})]}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mo,{fence:`true`,children:`)`})]})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`V(S_t) = V(S_t) + \\\\alpha \\\\left( G^\\\\lambda_t - V(S_t) \\\\right)`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`+`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1.2em`,verticalAlign:`-0.35em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0037em`},children:`α`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.1667em`}}),_jsxs(_components.span,{className:`minner`,children:[_jsx(_components.span,{className:`mopen delimcenter`,style:{top:`0em`},children:_jsx(_components.span,{className:`delimsizing size1`,children:`(`})}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,children:`G`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsxs(_components.span,{className:`vlist`,style:{height:`0.8491em`},children:[_jsxs(_components.span,{style:{top:`-2.453em`,marginLeft:`0em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]}),_jsxs(_components.span,{style:{top:`-3.063em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`λ`})})]})]}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.247em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mbin`,children:`−`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2222em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.2222em`},children:`V`}),_jsx(_components.span,{className:`mopen`,children:`(`}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.2806em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0576em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`t`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mclose delimcenter`,style:{top:`0em`},children:_jsx(_components.span,{className:`delimsizing size1`,children:`)`})})]})]})]})]})}),`\n`,_jsxs(_components.p,{children:[`When `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`λ`}),_jsx(_components.mo,{children:`=`}),_jsx(_components.mn,{children:`0`})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`\\\\lambda=0`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6944em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6444em`}}),_jsx(_components.span,{className:`mord`,children:`0`})]})]})]}),` we get TD(0) learning (the 1-step TD), while when `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsx(_components.mi,{children:`λ`}),_jsx(_components.mo,{children:`=`}),_jsx(_components.mn,{children:`1`})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`\\\\lambda=1`})]})})}),_jsxs(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:[_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6944em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`λ`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}}),_jsx(_components.span,{className:`mrel`,children:`=`}),_jsx(_components.span,{className:`mspace`,style:{marginRight:`0.2778em`}})]}),_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6444em`}}),_jsx(_components.span,{className:`mord`,children:`1`})]})]})]}),` we get learning that is roughly equivalent to MC. Certainly it is convenient to learn one guess from the next, without waiting for an actual outcome, but can we still guarantee convergence to the correct answer? Happily, the answer is yes. For any fixed policy `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsx(_components.mi,{children:`π`})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`π`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.4306em`}}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0359em`},children:`π`})]})})]}),`, TD(0) has been proved to converge to `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsxs(_components.msub,{children:[_jsx(_components.mi,{children:`v`}),_jsx(_components.mi,{children:`π`})]})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`v_π`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.5806em`,verticalAlign:`-0.15em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0359em`},children:`v`}),_jsx(_components.span,{className:`msupsub`,children:_jsxs(_components.span,{className:`vlist-t vlist-t2`,children:[_jsxs(_components.span,{className:`vlist-r`,children:[_jsx(_components.span,{className:`vlist`,style:{height:`0.1514em`},children:_jsxs(_components.span,{style:{top:`-2.55em`,marginLeft:`-0.0359em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,style:{marginRight:`0.0359em`},children:`π`})})]})}),_jsx(_components.span,{className:`vlist-s`,children:``})]}),_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.15em`},children:_jsx(_components.span,{})})})]})})]})]})})]}),`, in the mean for a constant step-size parameter if it is sufficiently small. However in terms of data efficiency there is no clear winner at this point.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key references`}),`: (Rafati \u0026 Noelle, 2019; Szepesvári et al., 2010; Yang et al., 2019; Tu \u0026 Recht, 2018; Schulman et al., 2017)`]}),`\n`,_jsx(Heading,{level:`2`,id:`references`,children:`References`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Rafati, J., Noelle, D. (2019). `,_jsx(_components.em,{children:`Learning sparse representations in reinforcement learning`}),`. arXiv [cs.LG].`]}),`\n`,_jsxs(_components.li,{children:[`Schulman, J., Wolski, F., Dhariwal, P., Radford, A., Klimov, O. (2017). `,_jsx(_components.em,{children:`Proximal Policy Optimization Algorithms`}),`. arXiv [cs.LG].`]}),`\n`,_jsxs(_components.li,{children:[`Szepesvári, C., Cochran, J., Cox, L., Keskinocak, P., Kharoufeh, J., et al. (2010). `,_jsx(_components.em,{children:`Reinforcement Learning Algorithms for MDPs`}),`. Wiley Encyclopedia of Operations Research and Management Science.`]}),`\n`,_jsxs(_components.li,{children:[`Tu, S., Recht, B. (2018). `,_jsx(_components.em,{children:`The Gap Between Model-Based and Model-Free Methods on the Linear Quadratic Regulator: An Asymptotic Viewpoint`}),`. arXiv [cs.LG].`]}),`\n`,_jsxs(_components.li,{children:[`Yang, Y., Caluwaerts, K., Iscen, A., Zhang, T., Tan, J., et al. (2019). `,_jsx(_components.em,{children:`Data efficient reinforcement learning for legged robots`}),`. arXiv [cs.LG].`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Callout,{icon:`bug`,iconType:`regular`,children:_jsxs(_components.p,{children:[`Found an error on this page? `,_jsx(_components.a,{href:`https://github.com/aegean-ai/eaia-feedback/issues/new?template=page-issue.yml\u0026page=/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference`,children:`Report an issue`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Temporal Difference (TD) Prediction","sidebarTitle":"Temporal Difference (TD) Prediction","sidebar":"sidebar-rl","description":null,"href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The TD()","slug":"the-td","depth":2,"children":[]},{"title":"References","slug":"references","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/aegeanaiinc/d160583580826147/aiml-common/lectures/planning/task-planning/pddl/blocksworld/blocksWorldViz.js","/_mintlify/custom/aegeanaiinc/0663393b76c10385/osano.js"],"subdomain":"aegeanaiinc","siteName":"aegean.ai","title":"Temporal Difference (TD) Prediction - aegean.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-21T19:28:36.118Z","originalFileLocation":"aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"aegean.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Temporal Difference (TD) Prediction - aegean.ai\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"aegean.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://aegeanaiinc.mintlify.app/_mintlify/api/og/v2?division=Prediction\u0026amp;title=Temporal+Difference+%28TD%29+Prediction\u0026amp;theme=2046057d19b3e219a8da908d\u0026amp;signature=52ba7e4fedf64c76590583c71c09fd650ec507247dbbd8f0ca06fa47f6dd2fea\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Temporal Difference (TD) Prediction - aegean.ai\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aegeanaiinc.mintlify.app/_mintlify/api/og/v2?division=Prediction\u0026amp;title=Temporal+Difference+%28TD%29+Prediction\u0026amp;theme=2046057d19b3e219a8da908d\u0026amp;signature=52ba7e4fedf64c76590583c71c09fd650ec507247dbbd8f0ca06fa47f6dd2fea\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/aegeanaiinc/6M9Gi5GgxBzndhcq/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"aegean.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2196C8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://aegean.ai/#organization\",\"name\":\"aegean.ai\",\"url\":\"https://aegean.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/aegeanaiinc/ai8d4zdsUnwq_5J6/logo.png?fit=max\u0026auto=format\u0026n=ai8d4zdsUnwq_5J6\u0026q=85\u0026s=fe5e281c1569f8468ff85157bd7d9dc3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://aegean.ai#website\",\"name\":\"aegean.ai\",\"url\":\"https://aegean.ai\",\"publisher\":{\"@id\":\"https://aegean.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference#webpage\",\"url\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference\",\"name\":\"Temporal Difference (TD) Prediction\",\"dateModified\":\"2026-10-21T19:28:36.118Z\",\"isPartOf\":{\"@id\":\"https://aegean.ai#website\"},\"breadcrumb\":{\"@id\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prediction\",\"item\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/monte-carlo\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Temporal Difference (TD) Prediction\",\"item\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference#article\",\"headline\":\"Temporal Difference (TD) Prediction\",\"name\":\"Temporal Difference (TD) Prediction\",\"url\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference\",\"mainEntityOfPage\":{\"@id\":\"https://aegean.ai/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference#webpage\"},\"dateModified\":\"2026-10-21T19:28:36.118Z\",\"publisher\":{\"@id\":\"https://aegean.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://aegean.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"aegean.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"aegean.ai","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"Products","icon":"box","menu":[{"item":"Overview","icon":"box","pages":[{"title":"Overview","href":"/products"}]},{"item":"Platforms","icon":"server","pages":[{"title":"Platforms","href":"/products/platforms"}]},{"item":"Applications","icon":"grid-2","pages":[{"title":"Applications","href":"/products/applications"}]},{"item":"Tech Demonstrations","icon":"flask","pages":[{"title":"Tech Demonstrations","href":"/products/tech-demonstrators"}]}],"pages":[{"title":"Products","href":"/products"}]},{"tab":"Book","icon":"book","menu":[{"item":"Introduction","pages":[{"title":"Introduction","href":"/book/introduction"}]},{"item":"Foundations","pages":[{"title":"Foundations","href":"/book/foundations"}]},{"item":"Neural Networks","pages":[{"title":"Neural Networks","href":"/book/training-dnns"}]},{"item":"Perception","icon":"eye","pages":[{"title":"Perception","href":"/book/perception"}]},{"item":"State Estimation \u0026 Mapping","icon":"compass","pages":[{"title":"State Estimation \u0026 Mapping","href":"/book/state-estimation-mapping"}]},{"item":"LLM","icon":"omega","pages":[{"title":"LLM","href":"/book/llms"}]},{"item":"VLM","icon":"image","pages":[{"title":"VLM","href":"/aiml-common/lectures/vlm"}]},{"item":"ALM","icon":"microphone","pages":[{"title":"ALM","href":"/aiml-common/lectures/speech/text-to-speech-and-voice-cloning"}]},{"item":"Logic","icon":"sitemap","pages":[{"title":"Logic","href":"/book/logic"}]},{"item":"Planning","icon":"route","pages":[{"title":"Planning","href":"/book/task-planning"}]},{"item":"MDPs","icon":"arrows-rotate","pages":[{"title":"MDPs","href":"/book/mdps"}]},{"item":"RL","icon":"arrows-rotate","groups":[{"group":"Reinforcement Learning","icon":"gamepad","pages":[{"title":"Reinforcement Learning","sidebarTitle":"Overview","href":"/book/reinforcement-learning"},{"title":"Introduction to RL","sidebarTitle":"RL Introduction","href":"/aiml-common/lectures/reinforcement-learning/index"}]},{"group":"Prediction","icon":"chart-line","pages":[{"title":"Monte-Carlo Prediction","sidebarTitle":"Monte-Carlo Prediction","description":null,"href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/monte-carlo"},{"title":"Temporal Difference (TD) Prediction","sidebarTitle":"Temporal Difference (TD) Prediction","href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/temporal-difference"},{"title":"MC vs. TD(0)","sidebarTitle":"MC vs TD(0)","description":"Monte Carlo vs Temporal Difference comparison on a Markov Reward Process - Sutton \u0026 Barto Example 6.2","href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/prediction/td-vs-mc-mrp/td-vs-mc-mrp"}]},{"group":"Value-based Control","icon":"sliders","pages":[{"title":"ε-greedy Monte-Carlo Control","sidebarTitle":"Monte-Carlo Control","href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/control/greedy-monte-carlo/index"},{"title":"SARSA","sidebarTitle":"SARSA","href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/control/sarsa/index"},{"title":"SARSA Gridworld Example","href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/control/sarsa/gridworld/sarsa_gridworld"},{"title":"Q-learning","sidebarTitle":"Q-learning","href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/control/q-learning/index"},{"title":"SARSA vs Q-learning on CliffWalking","sidebarTitle":"SARSA vs Q-learning","href":"/aiml-common/lectures/reinforcement-learning/value-based-algorithms/control/q-learning/sarsa-vs-q-learning/sarsa_vs_q_learning"}]},{"group":"Policy-based Control","icon":"bullseye","pages":[{"title":"Policy Gradient Algorithms - REINFORCE","sidebarTitle":"REINFORCE","href":"/aiml-common/lectures/reinforcement-learning/policy-based-algorithms/reinforce/index"},{"title":"Policy Gradient Minimal Examples","sidebarTitle":"Policy Gradient Minimal Examples","href":"/aiml-common/lectures/reinforcement-learning/policy-based-algorithms/reinforce/policy-gradient-simple-example/policy-gradient-simple-example"},{"title":"REINFORCE on CartPole-v1","sidebarTitle":"REINFORCE CartPole Example","href":"/aiml-common/lectures/reinforcement-learning/policy-based-algorithms/reinforce/reinforce-cartpole/reinforce-cartpole"}]},{"group":"Policy-Value-based Control","icon":"arrows-to-circle","pages":[{"title":"Proximal Policy Optimization (PPO)","sidebarTitle":"Proximal Policy Optimization (PPO)","tag":"Draft","href":"/aiml-common/lectures/reinforcement-learning/policy-based-algorithms/PPO/index"},{"title":"PPO: Minimal Finite-State Examples","sidebarTitle":"PPO Minimal Examples","tag":"Draft","href":"/aiml-common/lectures/reinforcement-learning/policy-based-algorithms/PPO/ppo-explained-minimal/ppo_explained_minimal"},{"title":"Grouped Relative Policy Optimization","sidebarTitle":"Grouped Relative Policy Optimization","tag":"Draft","href":"/aiml-common/lectures/reinforcement-learning/policy-based-algorithms/GRPO/index"}]},{"group":"Model-Based","icon":"diagram-project","pages":[{"title":"Model Based Algorithms and World Models","sidebarTitle":"Model-Based RL","href":"/aiml-common/lectures/reinforcement-learning/model-based-algorithms/index"}]}]},{"item":"Reasoning","icon":"brain","pages":[{"title":"Reasoning","href":"/aiml-common/lectures/reasoning"}]},{"item":"Latent Transport Models","icon":"wand-magic-sparkles","pages":[{"title":"Latent Transport Models","href":"/book/latent-transport-models"}]},{"item":"Robotics Systems","icon":"robot","pages":[{"title":"Robotics Systems","href":"/book/robotics-systems"}]},{"item":"Physical AI","icon":"microchip","pages":[{"title":"Physical AI","href":"/book/physical-ai"}]},{"item":"Prerequisites","pages":[{"title":"Prerequisites","href":"/book/prerequisites"}]}]},{"tab":"Courses","icon":"graduation-cap","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/courses"}]},{"item":"Introduction to AI","pages":[{"title":"Introduction to AI","href":"/courses/ai"}]},{"item":"DL for Computer Vision","pages":[{"title":"DL for Computer Vision","href":"/courses/cv"}]},{"item":"AI for Robotics","pages":[{"title":"AI for Robotics","href":"/courses/robotics"}]},{"item":"Resources","pages":[{"title":"Resources","href":"/courses/njit-calendar"}]}],"pages":[{"title":"Courses","href":"/courses"}]},{"tab":"Media","icon":"video","pages":[{"title":"Media","href":"/media"}]},{"tab":"AI Industry","icon":"flask","pages":[{"title":"AI Industry","href":"/research"}]},{"tab":"Blog","icon":"pen-nib","pages":[{"title":"Blog","href":"/blog"}]},{"tab":"Careers","icon":"briefcase","menu":[{"item":"Internships","pages":[{"title":"Internships","href":"/careers/virtual-internships"}]}],"pages":[{"title":"Careers","href":"/careers/virtual-internships"}]},{"tab":"About","icon":"user","pages":[{"title":"About","href":"/about"}]}]},"title":"Temporal Difference (TD) Prediction - aegean.ai","buildId":"dpl_9DauxEjb9gzCtcuhPQFbquJvx7FJ","deploymentId":"dpl_9DauxEjb9gzCtcuhPQFbquJvx7FJ","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-D4WcYaf4.js","PlusIcon-CwhPVjTe.js","lightbox-handle-r17bVUz3.js"]}