Using the ML-Agents Toolkit – a basic example
Now that everything is installed, we can start using the ML-Agents Toolkit. First, let's explain the basic architecture of an ML-Agents scene.
An ML-Agents scene is called a learning environment. The learning environment is a standard Unity scene and contains two main elements:
- The agent: Obviously, the Agent is the central object in the ML-Agents Toolkit. An agent is an object that performs an action, receives information from the environment, and can receive rewards for actions. To create an Agent, you need to subclass the
Agent
class and write the behavior for the agent. For instance, if the Agent is a car, we need to write how the car is controlled by the input and how we can reward and penalize the car (for example, we can reward the vehicle for going above a certain speed and punish it when it goes off-road). A learning environment can have as many agents as you like. - The academy: This component is a singleton...