Skip to content

Commit

Permalink
Fixing tables in documentation and other markdown errors. (#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Deric Pang committed Sep 7, 2018
1 parent ac929ed commit 273e3f4
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 92 deletions.
2 changes: 2 additions & 0 deletions docs/Basic-Guide.md
Expand Up @@ -103,9 +103,11 @@ communicate with the external training process when making their decisions.
- `--train` tells `mlagents-learn` to run a training session (rather
than inference)
4. If you cloned the ML-Agents repo, then you can simply run

```sh
mlagents-learn config/trainer_config.yaml --run-id=firstRun --train
```

5. When the message _"Start training by pressing the Play button in the Unity
Editor"_ is displayed on the screen, you can press the :arrow_forward: button
in Unity to start training in the Editor.
Expand Down
2 changes: 1 addition & 1 deletion docs/FAQ.md
Expand Up @@ -32,7 +32,7 @@ Within Unity](Installation.md#setting-up-ml-agent-within-unity) for solution.
If you try to use ML-Agents in Unity versions 2017.1 - 2017.3, you might
encounter an error that looks like this:

```console
```console
Instance of CoreBrainInternal couldn't be created. The the script
class needs to derive from ScriptableObject.
UnityEngine.ScriptableObject:CreateInstance(String)
Expand Down
2 changes: 1 addition & 1 deletion docs/Feature-Memory.md
Expand Up @@ -3,7 +3,7 @@
## What are memories used for?

Have you ever entered a room to get something and immediately forgot what you
were looking for? Don't let that happen to your agents.
were looking for? Don't let that happen to your agents.

It is now possible to give memories to your agents. When training, the agents
will be able to store a vector of floats to be used next time they need to make
Expand Down
2 changes: 1 addition & 1 deletion docs/Getting-Started-with-Balance-Ball.md
Expand Up @@ -33,7 +33,7 @@ and Unity, see the [installation instructions](Installation.md).
An agent is an autonomous actor that observes and interacts with an
_environment_. In the context of Unity, an environment is a scene containing an
Academy and one or more Brain and Agent objects, and, of course, the other
entities that an agent interacts with.
entities that an agent interacts with.

![Unity Editor](images/mlagents-3DBallHierarchy.png)

Expand Down
8 changes: 6 additions & 2 deletions docs/Installation.md
Expand Up @@ -20,7 +20,9 @@ Build Support_ component when installing Unity.

Once installed, you will want to clone the ML-Agents Toolkit GitHub repository.

git clone https://github.com/Unity-Technologies/ml-agents.git
```sh
git clone https://github.com/Unity-Technologies/ml-agents.git
```

The `UnitySDK` subdirectory contains the Unity Assets to add to your projects.
It also contains many [example environments](Learning-Environment-Examples.md)
Expand Down Expand Up @@ -65,7 +67,9 @@ on installing it.
To install the dependencies and `mlagents` Python package, enter the
`ml-agents/` subdirectory and run from the command line:

pip3 install .
```sh
pip3 install .
```

If you installed this correctly, you should be able to run
`mlagents-learn --help`
Expand Down
10 changes: 5 additions & 5 deletions docs/Learning-Environment-Create-New.md
Expand Up @@ -31,7 +31,7 @@ steps:
in the scene that represents the Agent in the simulation. Each Agent object
must be assigned a Brain object.
6. If training, set the Brain type to External and
[run the training process](Training-ML-Agents.md).
[run the training process](Training-ML-Agents.md).

**Note:** If you are unfamiliar with Unity, refer to
[Learning the interface](https://docs.unity3d.com/Manual/LearningtheInterface.html)
Expand Down Expand Up @@ -243,7 +243,7 @@ public class RollerAgent : Agent
public override void AgentReset()
{
if (this.transform.position.y < -1.0)
{
{
// The Agent fell
this.transform.position = Vector3.zero;
this.rBody.angularVelocity = Vector3.zero;
Expand Down Expand Up @@ -550,9 +550,9 @@ your Unity environment.
There are three kinds of game objects you need to include in your scene in order
to use Unity ML-Agents:

* Academy
* Brain
* Agents
* Academy
* Brain
* Agents

Keep in mind:

Expand Down
10 changes: 5 additions & 5 deletions docs/Learning-Environment-Design-Brains.md
Expand Up @@ -4,7 +4,7 @@ The Brain encapsulates the decision making process. Brain objects must be
children of the Academy in the Unity scene hierarchy. Every Agent must be
assigned a Brain, but you can use the same Brain with more than one Agent. You
can also create several Brains, attach each of the Brain to one or more than one
Agent.
Agent.

Use the Brain class directly, rather than a subclass. Brain behavior is
determined by the **Brain Type**. The ML-Agents toolkit defines four Brain
Expand Down Expand Up @@ -71,7 +71,7 @@ to a Brain component:

The Player, Heuristic and Internal Brains have been updated to support
broadcast. The broadcast feature allows you to collect data from your Agents
using a Python program without controlling them.
using a Python program without controlling them.

### How to use: Unity

Expand All @@ -85,17 +85,17 @@ When you launch your Unity Environment from a Python program, you can see what
the Agents connected to non-External Brains are doing. When calling `step` or
`reset` on your environment, you retrieve a dictionary mapping Brain names to
`BrainInfo` objects. The dictionary contains a `BrainInfo` object for each
non-External Brain set to broadcast as well as for any External Brains.
non-External Brain set to broadcast as well as for any External Brains.

Just like with an External Brain, the `BrainInfo` object contains the fields for
`visual_observations`, `vector_observations`, `text_observations`,
`memories`,`rewards`, `local_done`, `max_reached`, `agents` and
`previous_actions`. Note that `previous_actions` corresponds to the actions that
were taken by the Agents at the previous step, not the current one.
were taken by the Agents at the previous step, not the current one.

Note that when you do a `step` on the environment, you cannot provide actions
for non-External Brains. If there are no External Brains in the scene, simply
call `step()` with no arguments.
call `step()` with no arguments.

You can use the broadcast feature to collect data generated by Player,
Heuristics or Internal Brains game sessions. You can then use this data to train
Expand Down
Expand Up @@ -49,7 +49,7 @@ To use a graph model:
a Brain component.)
2. Set the **Brain Type** to **Internal**.
**Note:** In order to see the **Internal** Brain Type option, you must
[enable TensorFlowSharp](Using-TensorFlow-Sharp-in-Unity.md).
[enable TensorFlowSharp](Using-TensorFlow-Sharp-in-Unity.md).
3. Import the `environment_run-id.bytes` file produced by the PPO training
program. (Where `environment_run-id` is the name of the model file, which is
constructed from the name of your Unity environment executable and the run-id
Expand Down
40 changes: 14 additions & 26 deletions docs/Learning-Environment-Design-Player-Brains.md
Expand Up @@ -19,32 +19,20 @@ action per step. In contrast, when a Brain uses the continuous action space you
can send any number of floating point values (up to the **Vector Action Space
Size** setting).

| **Property** | | **Description** |
| :-- |:-- | :-- |
|**Continuous Player Actions**|| The mapping for the continuous vector action
space. Shown when the action space is **Continuous**|.
|| **Size** | The number of key commands defined. You can assign more than one
command to the same action index in order to send different values for that
action. (If you press both keys at the same time, deterministic results are not guaranteed.)|
||**Element 0–N**| The mapping of keys to action values. |
|| **Key** | The key on the keyboard. |
|| **Index** | The element of the Agent's action vector to set when this key is
pressed. The index value cannot exceed the size of the Action Space (minus 1,
since it is an array index).|
|| **Value** | The value to send to the Agent as its action for the specified
index when the mapped key is pressed. All other members of the action vector
are set to 0. |
|**Discrete Player Actions**|| The mapping for the discrete vector action space.
Shown when the action space is **Discrete**.|
|| **Size** | The number of key commands defined. |
||**Element 0–N**| The mapping of keys to action values. |
|| **Key** | The key on the keyboard. |
|| **Branch Index** |The element of the Agent's action vector to set when this
key is pressed. The index value cannot exceed the size of the Action Space
(minus 1, since it is an array index).|
|| **Value** | The value to send to the Agent as its action when the mapped key
is pressed. Cannot exceed the max value for the associated branch (minus 1,
since it is an array index).|
| **Property** | | **Description** |
| :---------------------------- | :--------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Continuous Player Actions** | | The mapping for the continuous vector action space. Shown when the action space is **Continuous**. |
| | **Size** | The number of key commands defined. You can assign more than one command to the same action index in order to send different values for that action. (If you press both keys at the same time, deterministic results are not guaranteed.) |
| | **Element 0–N** | The mapping of keys to action values. |
| | **Key** | The key on the keyboard. |
| | **Index** | The element of the Agent's action vector to set when this key is pressed. The index value cannot exceed the size of the Action Space (minus 1, since it is an array index). |
| | **Value** | The value to send to the Agent as its action for the specified index when the mapped key is pressed. All other members of the action vector are set to 0. |
| **Discrete Player Actions** | | The mapping for the discrete vector action space. Shown when the action space is **Discrete**. |
| | **Size** | The number of key commands defined. |
| | **Element 0–N** | The mapping of keys to action values. |
| | **Key** | The key on the keyboard. |
| | **Branch Index** | The element of the Agent's action vector to set when this key is pressed. The index value cannot exceed the size of the Action Space (minus 1, since it is an array index). |
| | **Value** | The value to send to the Agent as its action when the mapped key is pressed. Cannot exceed the max value for the associated branch (minus 1, since it is an array index). |

For more information about the Unity input system, see
[Input](https://docs.unity3d.com/ScriptReference/Input.html).
8 changes: 4 additions & 4 deletions docs/Learning-Environment-Design.md
Expand Up @@ -61,7 +61,7 @@ To create a training environment, extend the Academy and Agent classes to
implement the above methods. The `Agent.CollectObservations()` and
`Agent.AgentAction()` functions are required; the other methods are optional —
whether you need to implement them or not depends on your specific scenario.

**Note:** The API used by the Python PPO training process to communicate with
and control the Academy during training can be used for other purposes as well.
For example, you could use the API to use Unity as the simulation engine for
Expand Down Expand Up @@ -108,9 +108,9 @@ set in the Unity Editor Inspector. For training, the most important of these
properties is `Max Steps`, which determines how long each training episode
lasts. Once the Academy's step counter reaches this value, it calls the
`AcademyReset()` function to start the next episode.

See [Academy](Learning-Environment-Design-Academy.md) for a complete list of
the Academy properties and their uses.
the Academy properties and their uses.

### Brain

Expand Down Expand Up @@ -142,7 +142,7 @@ The Agent class represents an actor in the scene that collects observations and
carries out actions. The Agent class is typically attached to the GameObject in
the scene that otherwise represents the actor — for example, to a player object
in a football game or a car object in a vehicle simulation. Every Agent must be
assigned a Brain.
assigned a Brain.

To create an Agent, extend the Agent class and implement the essential
`CollectObservations()` and `AgentAction()` methods:
Expand Down
20 changes: 11 additions & 9 deletions docs/Learning-Environment-Examples.md
Expand Up @@ -75,7 +75,7 @@ If you would like to contribute environments, please see our
* Brains: One Brain with the following observation/action space.
* Vector Observation space: None
* Vector Action space: (Discrete) Size of 4, corresponding to movement in
cardinal directions. Note that for this environment,
cardinal directions. Note that for this environment,
[action masking](Learning-Environment-Design-Agents.md#masking-discrete-actions)
is turned on by default (this option can be toggled
using the `Mask Actions` checkbox within the `trueAgent` GameObject).
Expand Down Expand Up @@ -116,15 +116,17 @@ If you would like to contribute environments, please see our
* Set-up: A platforming environment where the agent can push a block around.
* Goal: The agent must push the block to the goal.
* Agents: The environment contains one agent linked to a single brain.
* Agent Reward Function:
* -0.0025 for every step.
* +1.0 if the block touches the goal.
* Agent Reward Function:
* -0.0025 for every step.
* +1.0 if the block touches the goal.
* Brains: One brain with the following observation/action space.
* Vector Observation space: (Continuous) 70 variables corresponding to 14
ray-casts each detecting one of three possible objects (wall, goal, or block).
* Vector Action space: (Discrete) Size of 6, corresponding to turn clockwise
and counterclockwise and move along four different face directions.
* Visual Observations (Optional): One first-person camera. Use `VisualPushBlock` scene.
* Vector Observation space: (Continuous) 70 variables corresponding to 14
ray-casts each detecting one of three possible objects (wall, goal, or
block).
* Vector Action space: (Discrete) Size of 6, corresponding to turn clockwise
and counterclockwise and move along four different face directions.
* Visual Observations (Optional): One first-person camera. Use
`VisualPushBlock` scene.
* Reset Parameters: None.
* Benchmark Mean Reward: 4.5
* Optional Imitation Learning scene: `PushBlockIL`.
Expand Down
2 changes: 1 addition & 1 deletion docs/Migrating.md
Expand Up @@ -13,7 +13,7 @@
or later`. 2017.4 is an LTS (Long Term Support) version that helps us
maintain good quality and support. Earlier versions of Unity might still work,
but you may encounter an
[error](FAQ.md#instance-of-corebraininternal-couldnt-be-created) listed here.
[error](FAQ.md#instance-of-corebraininternal-couldnt-be-created) listed here.

### Unity API

Expand Down

0 comments on commit 273e3f4

Please sign in to comment.