RAMario:爬行动物算法的实验方法——用于马里奥的强化学习
RAMario: Experimental Approach to Reptile Algorithm -- Reinforcement Learning for Mario
AI总结:
本文提出使用 Reptile 元学习算法训练神经网络玩 Super Mario Bros,实验表明其在 1M 训练回合中表现优于 PPO 和 DQN,为视频游戏 AI 的小样本学习提供了有效方法。
摘要:
本文提出了一种使用 Reptile 算法进行强化学习以训练神经网络玩 Super Mario Bros 的实验方法。我们使用 Python 中的 Super Mario Bros Gym 库和 TensorFlow 实现了 Reptile 算法,创建了一个包含单个卷积层、一个展平层和一个全连接层的神经网络模型。我们定义了优化器,并使用 Reptile 类创建了 Reptile 元学习算法的实例。我们使用多个任务和回合训练模型,通过使用神经网络模型的当前权重选择动作,在环境中执行这些动作,并使用 Reptile 算法更新模型权重。我们通过打印每个回合的总奖励来评估算法的性能。此外,我们将 Reptile 算法的性能与应用于相同 Super Mario Bros 任务的另外两种流行的强化学习算法 Proximal Policy Optimization (PPO) 和 Deep Q-Network (DQN) 进行了比较。我们的结果表明,Reptile 算法为视频游戏 AI 中的小样本学习提供了一种有前景的方法,其性能与其他两种算法相当甚至更好,特别是在智能体进行 1M 训练回合的动作与距离方面。结果显示,游戏环境中 world 1-2 的最佳总距离分别为 ~1732 (PPO)、~1840 (DQN) 和 ~2300 (RAMario)。完整代码可在 https://github.com/s4nyam/RAMario 获取。
英文摘要:
This research paper presents an experimental approach to using the Reptile algorithm for reinforcement learning to train a neural network to play Super Mario Bros. We implement the Reptile algorithm using the Super Mario Bros Gym library and TensorFlow in Python, creating a neural network model with a single convolutional layer, a flatten layer, and a dense layer. We define the optimizer and use the Reptile class to create an instance of the Reptile meta-learning algorithm. We train the model using multiple tasks and episodes, choosing actions using the current weights of the neural network model, taking those actions in the environment, and updating the model weights using the Reptile algorithm. We evaluate the performance of the algorithm by printing the total reward for each episode. In addition, we compare the performance of the Reptile algorithm approach to two other popular reinforcement learning algorithms, Proximal Policy Optimization (PPO) and Deep Q-Network (DQN), applied to the same Super Mario Bros task. Our results demonstrate that the Reptile algorithm provides a promising approach to few-shot learning in video game AI, with comparable or even better performance than the other two algorithms, particularly in terms of moves vs distance that agent performs for 1M episodes of training. The results shows that best total distance for world 1-2 in the game environment were ~1732 (PPO), ~1840 (DQN) and ~2300 (RAMario). Full code is available at https://github.com/s4nyam/RAMario.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。