zhiqingxiao / rl-book Goto Github PK
View Code? Open in Web Editor NEWSource codes for the book "Reinforcement Learning: Theory and Python Implementation"
Home Page: https://zhiqingxiao.github.io/rl-book
Source codes for the book "Reinforcement Learning: Theory and Python Implementation"
Home Page: https://zhiqingxiao.github.io/rl-book
There is nothing in code chapter 13 from the code.md file.
电子书无法下载求解
在 class TileCoder 里的__call__()
def call(self, floats=(), ints=()):
dim = len(floats)
scaled_floats = tuple(f * self.layers * self.layers for f in floats)
features = []
for layer in range(self.layers):
codeword = (layer,) + tuple(int((f + (1 + dim * i) * layer) /
self.layers) for i, f in enumerate(scaled_floats)) + ints
feature = self.get_feature(codeword)
features.append(feature)
return features
这里使用了 (f + (1 + dim * i) * layer) 来计算不同layer的位置
但是实际计算, 当i=1时 会把1-7层的的坐标映射到1-9或2-10
实测表明 使用(f + layer) 效果会更好 而且会严格的把1-7层的数据映射到0-8
SARSA 算法<<<<<<<<<<<<<<<<<<<<<
平均回合奖励 = -12649.0 / 100 = -126.49
SARSA(λ) 算法<<<<<<<<<<<<<<<<<<<<<
平均回合奖励 = -10181.0 / 100 = -101.81
我们为什么要采用(f + (1 + dim * i) * layer) 来计算呢?
请问一下书本第二章线性规划求解最优状态价值中:minimize、over、s.t.各代表什么啊,书本并没有说明,网上也没有类似这样的表达
我太服气了,这么多错误。要一边看电子版一边看勘误。牛。
该书是不是还没有正式出版,为什么查不到相关信息。
I'm getting the following error when running the Advantage Actor-Critic to Play Acrobot-V1
ValueError Traceback (most recent call last)
in <cell line: 21>()
20 episode_rewards = []
21 for episode in itertools.count():
---> 22 episode_reward, elapsed_steps = play_episode(env, agent, seed=episode,
23 mode='train')
24 episode_rewards.append(episode_reward)
in play_episode(env, agent, seed, mode, render)
1 def play_episode(env, agent, seed=None, mode=None, render=False):
----> 2 observation, _ = env.reset(seed=seed)
3 reward, terminated, truncated = 0., False, False
4 agent.reset(mode=mode)
5 episode_reward, elapsed_steps = 0., 0
ValueError: too many values to unpack (expected 2)
请教
代码清单6-4中,智能体的get_q方法的return,动作价值不是应该权重乘上特征向量吗,但是为什么这里是self.w[features]?
代码清单6.3 砖瓦编码
为什么这么第一层是64个砖瓦,剩下7层是81个砖瓦呢?8+1是怎么来的?我的理解是如果选用8层,那么每层是大网格/砖瓦 相当于8*8的小格。可一层覆盖最终有网格/瓦片是怎么决定的呢?
请问一下第34页的代码去哪了?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.