Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
labmlai
GitHub Repository: labmlai/annotated_deep_learning_paper_implementations
Path: blob/master/translate_cache/rl/game.zh.json
4924 views
1
{
2
"<h1>Atari wrapper with multi-processing</h1>\n": "<h1>\u5177\u6709\u591a\u5904\u7406\u529f\u80fd\u7684 Atari \u5c01\u88c5\u5668</h1>\n",
3
"<h2>Worker Process</h2>\n<p>Each worker process runs this method</p>\n": "<h2>\u5de5\u4f5c\u6d41\u7a0b</h2>\n<p>\u6bcf\u4e2a\u5de5\u4f5c\u8fdb\u7a0b\u90fd\u8fd0\u884c\u6b64\u65b9\u6cd5</p>\n",
4
"<h3>Reset environment</h3>\n<p>Clean up episode info and 4 frame stack</p>\n": "<h3>\u91cd\u7f6e\u73af\u5883</h3>\n<p>\u6e05\u7406\u5267\u96c6\u4fe1\u606f\u548c 4 \u5e27\u5806\u53e0</p>\n",
5
"<h3>Step</h3>\n<p>Executes <span translate=no>_^_0_^_</span> for 4 time steps and returns a tuple of (observation, reward, done, episode_info).</p>\n<ul><li><span translate=no>_^_1_^_</span>: stacked 4 frames (this frame and frames for last 3 actions) </li>\n<li><span translate=no>_^_2_^_</span>: total reward while the action was executed </li>\n<li><span translate=no>_^_3_^_</span>: whether the episode finished (a life lost) </li>\n<li><span translate=no>_^_4_^_</span>: episode information if completed</li></ul>\n": "<h3>\u4e00\u6b65</h3>\n<p>\u6267\u884c 4 \u4e2a<span translate=no>_^_0_^_</span>\u65f6\u95f4\u6b65\u957f\u5e76\u8fd4\u56de\u4e00\u4e2a\u5143\u7ec4\uff08\u89c2\u5bdf\u3001\u5956\u52b1\u3001\u5b8c\u6210\u3001episode_info\uff09\u3002</p>\n<ul><li><span translate=no>_^_1_^_</span>: \u5806\u53e0 4 \u5e27\uff08\u6b64\u5e27\u548c\u6700\u540e 3 \u4e2a\u52a8\u4f5c\u7684\u5e27\uff09</li>\n<li><span translate=no>_^_2_^_</span>: \u6267\u884c\u884c\u52a8\u65f6\u7684\u603b\u5956\u52b1</li>\n<li><span translate=no>_^_3_^_</span>: \u5267\u96c6\u662f\u5426\u7ed3\u675f\uff08\u5931\u53bb\u751f\u547d\uff09</li>\n</ul><li><span translate=no>_^_4_^_</span>: \u5267\u96c6\u4fe1\u606f\uff08\u5982\u679c\u5df2\u5b8c\u6210\uff09</li>\n",
6
"<h4>Process game frames</h4>\n<p>Convert game frames to gray and rescale to 84x84</p>\n": "<h4>\u5904\u7406\u6e38\u620f\u5e27</h4>\n<p>\u5c06\u6e38\u620f\u5e27\u8f6c\u6362\u4e3a\u7070\u8272\u5e76\u91cd\u65b0\u7f29\u653e\u4e3a 84x84</p>\n",
7
"<p> <a id=\"GameEnvironment\"></a></p>\n<h2>Game environment</h2>\n<p>This is a wrapper for OpenAI gym game environment. We do a few things here:</p>\n<p>1. Apply the same action on four frames and get the last frame 2. Convert observation frames to gray and scale it to (84, 84) 3. Stack four frames of the last four actions 4. Add episode information (total reward for the entire episode) for monitoring 5. Restrict an episode to a single life (game has 5 lives, we reset after every single life)</p>\n<h4>Observation format</h4>\n<p>Observation is tensor of size (4, 84, 84). It is four frames (images of the game screen) stacked on first axis. i.e, each channel is a frame.</p>\n": "<p><a id=\"GameEnvironment\"></a></p>\n<h2>\u6e38\u620f\u73af\u5883</h2>\n<p>\u8fd9\u662f OpenAI \u5065\u8eab\u6e38\u620f\u73af\u5883\u7684\u5c01\u88c5\u3002\u6211\u4eec\u5728\u8fd9\u91cc\u505a\u4e86\u51e0\u4ef6\u4e8b\uff1a</p>\n<p>1.\u5728\u56db\u5e27\u4e0a\u5e94\u7528\u76f8\u540c\u7684\u52a8\u4f5c\u5e76\u83b7\u5f97\u6700\u540e\u4e00\u5e27 2\u3002\u5c06\u89c2\u6d4b\u5e27\u8f6c\u6362\u4e3a\u7070\u8272\u5e76\u5c06\u5176\u7f29\u653e\u4e3a (84, 84) 3\u3002\u5806\u53e0\u6700\u540e\u56db\u4e2a\u52a8\u4f5c\u4e2d\u7684\u56db\u5e27 4.\u6dfb\u52a0\u5267\u96c6\u4fe1\u606f\uff08\u6574\u4e2a\u5267\u96c6\u7684\u603b\u5956\u52b1\uff09\u4ee5\u8fdb\u884c\u76d1\u63a7 5.\u5c06\u4e00\u96c6\u9650\u5236\u4e3a\u5355\u4eba\u751f\u547d\uff08\u6e38\u620f\u6709 5 \u6761\u751f\u547d\uff0c\u6211\u4eec\u5728\u6bcf\u4e00\u6b21\u751f\u547d\u4e4b\u540e\u91cd\u7f6e\uff09</p>\n<h4>\u89c2\u5bdf\u683c\u5f0f</h4>\n<p>\u89c2\u6d4b\u503c\u662f\u5927\u5c0f\u4e3a\u5f20\u91cf\uff084\u300184\u300184\uff09\u3002\u5b83\u662f\u5806\u53e0\u5728\u7b2c\u4e00\u8f74\u4e0a\u7684\u56db\u4e2a\u5e27\uff08\u6e38\u620f\u5c4f\u5e55\u7684\u56fe\u50cf\uff09\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u6bcf\u4e2a\u901a\u9053\u90fd\u662f\u4e00\u4e2a\u5e27\u3002</p>\n",
8
"<p> Creates a new worker and runs it in a separate process.</p>\n": "<p>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 worker \u5e76\u5728\u5355\u72ec\u7684\u8fdb\u7a0b\u4e2d\u8fd0\u884c\u5b83\u3002</p>\n",
9
"<p>and number of lives left </p>\n": "<p>\u548c\u5269\u4e0b\u7684\u751f\u547d\u6570\u91cf</p>\n",
10
"<p>buffer to keep the maximum of last 2 frames </p>\n": "<p>\u7f13\u51b2\u533a\u4ee5\u4fdd\u6301\u6700\u540e 2 \u5e27\u7684\u6700\u5927\u503c</p>\n",
11
"<p>create environment </p>\n": "<p>\u521b\u5efa\u73af\u5883</p>\n",
12
"<p>create game </p>\n": "<p>\u521b\u5efa\u6e38\u620f</p>\n",
13
"<p>execute the action in the OpenAI Gym environment </p>\n": "<p>\u5728 OpenAI Gym \u73af\u5883\u4e2d\u6267\u884c\u52a8\u4f5c</p>\n",
14
"<p>get number of lives left </p>\n": "<p>\u83b7\u5f97\u5269\u4f59\u7684\u751f\u547d\u6570</p>\n",
15
"<p>get the max of last two frames </p>\n": "<p>\u83b7\u5f97\u6700\u540e\u4e24\u5e27\u7684\u6700\u5927\u503c</p>\n",
16
"<p>if finished, set episode information if episode is over, and reset </p>\n": "<p>\u5982\u679c\u5df2\u5b8c\u6210\uff0c\u5219\u5728\u5267\u96c6\u7ed3\u675f\u65f6\u8bbe\u7f6e\u5267\u96c6\u4fe1\u606f\uff0c\u7136\u540e\u91cd\u7f6e</p>\n",
17
"<p>keep track of the episode rewards </p>\n": "<p>\u8ddf\u8e2a\u5267\u96c6\u5956\u52b1</p>\n",
18
"<p>maintain rewards for each step </p>\n": "<p>\u4fdd\u6301\u6bcf\u4e00\u6b65\u7684\u5956\u52b1</p>\n",
19
"<p>push it to the stack of 4 frames </p>\n": "<p>\u628a\u5b83\u63a8\u5230 4 \u5e27\u7684\u5806\u6808\u4e2d</p>\n",
20
"<p>reset OpenAI Gym environment </p>\n": "<p>\u91cd\u7f6e OpenAI \u5065\u8eab\u623f\u73af\u5883</p>\n",
21
"<p>reset caches </p>\n": "<p>\u91cd\u7f6e\u7f13\u5b58</p>\n",
22
"<p>reset if a life is lost </p>\n": "<p>\u5982\u679c\u751f\u547d\u4e27\u5931\u5219\u91cd\u7f6e</p>\n",
23
"<p>run for 4 steps </p>\n": "<p>\u8dd1 4 \u6b65</p>\n",
24
"<p>tensor for a stack of 4 frames </p>\n": "<p>4 \u5e27\u5806\u6808\u7684\u5f20\u91cf</p>\n",
25
"<p>wait for instructions from the connection and execute them </p>\n": "<p>\u7b49\u5f85\u6765\u81ea\u8fde\u63a5\u7684\u6307\u4ee4\u5e76\u6267\u884c\u5b83\u4eec</p>\n",
26
"Atari wrapper with multi-processing": "\u5177\u6709\u591a\u5904\u7406\u529f\u80fd\u7684 Atari \u5c01\u88c5\u5668",
27
"This implements the Atari games with multi-processing.": "\u8fd9\u5b9e\u73b0\u4e86\u5177\u6709\u591a\u91cd\u5904\u7406\u529f\u80fd\u7684 Atari \u6e38\u620f\u3002"
28
}
29