{"id":1538,"date":"2026-04-12T23:14:16","date_gmt":"2026-04-12T15:14:16","guid":{"rendered":"https:\/\/lingbo.online\/?p=1538"},"modified":"2026-04-12T23:14:16","modified_gmt":"2026-04-12T15:14:16","slug":"on-policy%e5%92%8coff-policy","status":"publish","type":"post","link":"https:\/\/lingbo.online\/index.php\/uncategorized\/on-policy%e5%92%8coff-policy\/","title":{"rendered":"On-Policy\u548cOff-Policy"},"content":{"rendered":"<h3>\u6982\u8ff0<\/h3>\n<p>\u5728\u5f3a\u5316\u5b66\u4e60\uff08Reinforcement Learning,RL\uff09\u4e2d\uff0cOn-Policy\uff08\u540c\u7b56\u7565\uff09\u548cOff-Policy\uff08\u5f02\u7b56\u7565\uff09\u4ee3\u8868\u4e86\u4e24\u79cd\u4e0d\u540c\u7684\u8bad\u7ec3\u6570\u636e\u4f7f\u7528\u7b56\u7565\u3002\u5176\u4e2d\uff0cOn-Policy\u5728\u7b97\u6cd5\u5b66\u4e60\u4e2d\u4f7f\u7528\u7684\u201c\u6570\u636e\u6765\u6e90\u201d\u548c\u201c\u5f53\u524d\u6267\u884c\u52a8\u4f5c\u7684\u7b56\u7565\u201d\u4e00\u81f4\uff0c\u7528\u5f53\u524d\u7b56\u7565\u4ea7\u751f\u7684\u6570\u636e\u8bad\u7ec3\u81ea\u8eab\uff1bOff-Policy\u5219\u5229\u7528\u5386\u53f2\u6570\u636e\uff08\u751a\u81f3\u5176\u4ed6\u7b56\u7565\u751f\u6210\u7684\u6570\u636e\uff09\u8fdb\u884c\u8bad\u7ec3\uff0c\u5728\u7075\u6d3b\u6027\u548c\u6570\u636e\u5229\u7528\u7387\u5dee\u5f02\u663e\u8457\u3002<\/p>\n<h3>\u7b56\u7565\u5bf9\u6bd4<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u7ef4\u5ea6<\/th>\n<th>On-Policy<\/th>\n<th>Off-Policy<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6570\u636e\u4e0e\u7b56\u7565\u7684\u5173\u7cfb<\/td>\n<td>\u8bad\u7ec3\u4f7f\u7528\u7684\u6570\u636e\u5fc5\u987b\u7531\u5f53\u524d\u5f85\u4f18\u5316\u7684\u7b56\u7565\uff08\u03c0\uff09\u4ea7\u751f<\/td>\n<td>\u8bad\u7ec3\u7528\u7684\u6570\u636e\u53ef\u4ee5\u6765\u81ea\u5386\u53f2\u7b56\u7565\uff08\u5982\u63a2\u7d22\u7b56\u7b56\u7565\u03bc\uff09\u6216\u8005\u5176\u4ed6\u7b56\u7565\uff0c\u65e0\u9700\u548c\u5f53\u524d\u4f18\u5316\u7b56\u7565\uff08\u03c0\uff09\u4fdd\u6301\u4e00\u81f4<\/td>\n<\/tr>\n<tr>\n<td>\u6838\u5fc3\u76ee\u6807<\/td>\n<td>\u76f4\u63a5\u4f18\u5316\u6b63\u5728\u6267\u884c\u52a8\u4f5c\u7684\u7b56\u7565\uff0c\u4fdd\u8bc1\u6570\u636e\u548c\u7b56\u7565\u7684\u5373\u65f6\u5339\u914d<\/td>\n<td>\u4ece\u4efb\u610f\u53ef\u7528\u6570\u636e\u4e2d\u5b66\u4e60\u6700\u4f18\u7b56\u7565\uff0c\u4e0d\u4f9d\u8d56\u5f53\u524d\u7b56\u7565\u7684\u5b9e\u65f6\u6570\u636e\u751f\u6210<\/td>\n<\/tr>\n<tr>\n<td>\u5178\u578b\u7279\u5f81<\/td>\n<td>\u6570\u636e\u5373\u7528\u5373\u751f\u6210\uff0c\u65e0\u6cd5\u590d\u7528\u5386\u53f2\u6570\u636e<\/td>\n<td>\u53ef\u590d\u7528\u5386\u53f2\u6570\u636e\u3001\u79bb\u7ebf\u6570\u636e\uff0c\u6570\u636e\u5229\u7528\u7387\u9ad8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5178\u578b\u6848\u4f8b<\/h3>\n<p>On-Policy\uff1a<br \/>\n\u5047\u8bbe\u673a\u5668\u4eba\u7528 \u03b5-\u8d2a\u5fc3\u7b56\u7565\uff08\u03b5-greedy\uff09 \u63a2\u7d22\uff0890%\u6982\u7387\u9009\u5f53\u524d\u8ba4\u4e3a\u6700\u4f18\u7684\u6b65\u5e45\uff0c10%\u968f\u673a\u8bd5\u9519\uff09\uff1a<\/p>\n<ul>\n<li>\u5b83\u6bcf\u8d70\u4e00\u6b65\uff08\u6267\u884c\u52a8\u4f5c\uff09\uff0c\u90fd\u4f1a\u8bb0\u5f55\u201c\u5f53\u524d\u72b6\u6001\uff08\u5982\u5730\u9762\u5761\u5ea6\uff09\u2192 \u52a8\u4f5c\uff08\u6b65\u5e4510cm\uff09\u2192 \u5956\u52b1\uff08\u662f\u5426\u6454\u5012\/\u8d70\u7a33\uff09\u201d\u7684\u6570\u636e\uff1b<\/li>\n<li>\u8bad\u7ec3\u65f6\uff0c\u53ea\u80fd\u7528\u8fd9\u7ec4\u201c\u521a\u8d70\u51fa\u6765\u7684\u6570\u636e\u201d\u66f4\u65b0\u7b56\u7565\uff08\u6bd4\u5982\u8c03\u6574\u6b65\u5e45\u523012cm\uff09\uff1b<\/li>\n<li>\u4e0b\u6b21\u8d70\u8def\u65f6\uff0c\u7528\u66f4\u65b0\u540e\u7684\u65b0\u7b56\u7565\u91cd\u65b0\u751f\u6210\u6570\u636e\uff0c\u518d\u7ee7\u7eed\u8bad\u7ec3\u2014\u2014\u65e7\u7b56\u7565\u751f\u6210\u7684\u201c\u6b65\u5e458cm\u201d\u7684\u6570\u636e\u65e0\u6cd5\u590d\u7528\uff0c\u56e0\u4e3a\u5f53\u524d\u7b56\u7565\u5df2\u53d8\u3002<br \/>\n<strong>\u5178\u578b\u7b97\u6cd5:<\/strong>Sarsa(\u65f6\u5e8f\u5dee\u5206\u5b66\u4e60\u7684\u540c\u7b56\u7565\u7248\u672c)<\/li>\n<\/ul>\n<p>Off-Policy\uff1a\u53c2\u8003\u522b\u4eba\u7684\u8d70\u8def\u8bb0\u5f55\uff0c\u6765\u4f18\u5316\u8d70\u6cd5<br \/>\n\u673a\u5668\u4eba\u4f9d\u7136\u7528\u03b5-\u8d2a\u5fc3\u7b56\u7565\uff08\u03bc\uff09\u63a2\u7d22\uff08\u8d1f\u8d23\u201c\u8bd5\u9519\u3001\u6536\u96c6\u6570\u636e\u201d\uff09\uff0c\u4f46\u8bad\u7ec3\u65f6\uff1a<\/p>\n<ul>\n<li>\u5b83\u4f1a\u8bb0\u5f55\u201c\u63a2\u7d22\u7b56\u7565\u03bc\u7684\u6240\u6709\u6570\u636e\u201d\uff08\u6bd4\u5982\u6b65\u5e458cm\u300110cm\u300115cm\u7684\u5c1d\u8bd5\u7ed3\u679c\uff09\uff1b<\/li>\n<li>\u8bad\u7ec3\u65f6\uff0c\u4e0d\u76f4\u63a5\u4f18\u5316\u63a2\u7d22\u7b56\u7565\u03bc\uff0c\u800c\u662f\u4ece\u8fd9\u4e9b\u6570\u636e\u4e2d\u63d0\u53d6\u201c\u5bf9\u6700\u4f18\u7b56\u7565\u03c0\u6709\u7528\u7684\u4fe1\u606f\u201d\uff08\u6bd4\u5982\u53d1\u73b0\u201c\u6b65\u5e4512cm\u65f6\u6454\u5012\u6700\u5c11\u201d\uff0c\u5373\u4f7f\u63a2\u7d22\u7b56\u7565\u5f88\u5c11\u900912cm\uff09\uff1b<\/li>\n<li>\u751a\u81f3\u53ef\u4ee5\u590d\u7528\u201c\u53bb\u5e74\u5176\u4ed6\u673a\u5668\u4eba\u5b66\u8d70\u8def\u7684\u5386\u53f2\u6570\u636e\u201d\uff0c\u65e0\u9700\u81ea\u5df1\u91cd\u65b0\u8bd5\u9519\u2014\u2014\u6570\u636e\u6765\u6e90\u5b8c\u5168\u72ec\u7acb\u4e8e\u5f53\u524d\u4f18\u5316\u7684\u7b56\u7565\u03c0\u3002<\/li>\n<\/ul>\n<p><strong>\u5178\u578b\u7b97\u6cd5\uff1a<\/strong>Q-Learning(\u65f6\u5e8f\u5dee\u5206\u5b66\u4e60\u7684\u5f02\u7b56\u7565\u7248\u672c)\u3001DQN<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0 \u5728\u5f3a\u5316\u5b66\u4e60\uff08Reinforcement Learning,RL\uff09\u4e2d\uff0cOn-Policy\uff08\u540c\u7b56\u7565\uff09\u548cOff-Policy\uff08\u5f02\u7b56 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1538","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/1538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/comments?post=1538"}],"version-history":[{"count":1,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/1538\/revisions"}],"predecessor-version":[{"id":1539,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/1538\/revisions\/1539"}],"wp:attachment":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/media?parent=1538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/categories?post=1538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/tags?post=1538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}