所谓的 attention,实际是关系如何计算出一个权重的问题。
因为 Available actions 的数量是变化的,而 FC 的节点数是固定的,这导致不能仅使用 softmax 来选取动作。假设 FC 的节点数为 n,则 one-hot 形式的 Available actions 被 Embedding 转换成长度为 n 的向量。
OpenAI Five 的论文将之称为 linear projection:
The primary action is chosen via a linear projection over the available actions.
For many of the actions we wrote simple action filters, which determine whether the action is available; these check if there is a valid target nearby, if the ability/item is on cooldown, etc. At each timestep we restrict the set of available actions using these filters and present the final choices to the model.
这两幅图的效果是一样的。不妨看第二幅图,首先对于 Units 的选择,仍然是 embedding-dot 组合来实现 linear projection。而在红色标记的地方,乘以了一个权重,sigmoid 得到 0 与 1 之间的权重。
embedding 如何被训练?
墨之科技,版权所有 © Copyright 2017-2027
湘ICP备14012786号 邮箱:ai@inksci.com