I8-Unit_5-Introduction_to_Unity_ML_Agents-A0-Introduction

中英文对照学习,效果更佳!
原课程链接:https://huggingface.co/deep-rl-course/unit8/hands-on-sf?fw=pt

An Introduction to Unity ML-Agents

Unity ML-Agents简介

thumbnail
One of the challenges in Reinforcement Learning is creating environments. Fortunately for us, we can use game engines to achieve so.
These engines, such as Unity, Godot or Unreal Engine, are programs made to create video games. They are perfectly suited
for creating environments: they provide physics systems, 2D/3D rendering, and more.

强化学习的挑战之一是创造环境。幸运的是,我们可以使用游戏引擎来实现这一点。这些引擎,如Unity、GoDot或虚幻引擎,都是用来创建视频游戏的程序。它们非常适合创建环境:它们提供物理系统、2D/3D渲染等。

One of them, Unity, created the Unity ML-Agents Toolkit, a plugin based on the game engine Unity that allows us to use the Unity Game Engine as an environment builder to train agents. In the first bonus unit, this is what we used to train Huggy to catch a stick!

其中之一,Unity,创建了Unity ML-Agents工具包,这是一个基于游戏引擎Unity的插件,允许我们使用Unity游戏引擎作为环境构建器来培训代理。在第一个奖金单元,这是我们用来训练Huggy接棒的!

MLAgents environments
Source: ML-Agents documentation
Unity ML-Agents Toolkit provides many exceptional pre-made environments, from playing football (soccer), learning to walk, and jumping big walls.

MLAgents环境来源:ML-Agents文档Unity ML-Agents工具包提供了许多特殊的预制环境,从踢足球、学习走路到跳过高墙。

In this Unit, we’ll learn to use ML-Agents, but don’t worry if you don’t know how to use the Unity Game Engine: you don’t need to use it to train your agents.

在本单元中,我们将学习如何使用ML-Agents,但如果您不知道如何使用Unity Game Engine,请不要担心:您不需要使用它来培训您的代理。

So, today, we’re going to train two agents:

所以,今天,我们要培训两名特工:

  • The first one will learn to shoot snowballs onto spawning target.
  • The second needs to press a button to spawn a pyramid, then navigate to the pyramid, knock it over, and move to the gold brick at the top. To do that, it will need to explore its environment, which will be achieved using a technique called curiosity.

Environments
Then, after training, you’ll push the trained agents to the Hugging Face Hub, and you’ll be able to visualize it playing directly on your browser without having to use the Unity Editor.

第一个人将学习向产卵目标发射雪球。第二个人需要按下按钮来产生金字塔,然后导航到金字塔,将其击倒,并移动到顶部的金砖。要做到这一点,它需要探索它的环境,这将使用一种称为好奇心的技术来实现。然后,在培训结束后,你将把训练有素的特工推到Hugging Face中心,你将能够可视化地在你的浏览器上直接播放它,而不必使用Unity编辑器。

Doing this Unit will prepare you for the next challenge: AI vs. AI where you will train agents in multi-agents environments and compete against your classmates’ agents.

做这个单元将为你准备下一个挑战:人工智能与人工智能,在那里你将在多代理环境中训练代理,并与你同学的代理竞争。

Sounds exciting? Let’s get started!

听起来很刺激吧?我们开始吧!