Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/API-Reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# API Reference

Our developer-facing C# classes (Academy, Agent, Decision and
Monitor) have been documented to be compatabile with
[Doxygen](http://www.stack.nl/~dimitri/doxygen/) for auto-generating HTML
documentation.

To generate the API reference,
[download Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html) and run
the following command within the `docs/` directory:

doxygen dox-ml-agents.conf

`dox-ml-agents.conf` is a Doxygen configuration file for ML-Agents
that includes the classes that have been properly formatted.
The generated HTML files will be placed
in the `html/` subdirectory. Open `index.html` within that subdirectory to
navigate to the API reference home. Note that `html/` is already included in
the repository's `.gitignore` file.

In the near future, we aim to expand our documentation
to include all the Unity C# classes and Python API.
10 changes: 2 additions & 8 deletions docs/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
* [ML-Agents Glossary](Glossary.md)
* [Limitations & Common Issues](Limitations-and-Common-Issues.md)

## C# API and Components
* Academy
* Agent
* Decision
* Monitor

## Python API
## API Docs
* [API Reference](API-Reference.md)
* [How to use the Python API](Python-API.md)

33 changes: 5 additions & 28 deletions docs/dox-ml-agents.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PROJECT_NAME = "ML-Agents"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.2
PROJECT_NUMBER = v0.3

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -783,33 +783,10 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ML-Agents-Overview.md \
Background-Unity.md \
Background-Machine-Learning.md \
Background-TensorFlow.md \
Installation.md \
Installation-Docker.md \
Background-Jupyter.md \
Getting-Started-with-Balance-Ball.md \
Learning-Environment-Examples.md \
Learning-Environment-Create-New.md \
Learning-Environment-Design.md \
Learning-Environment-Design-Agents.md \
Learning-Environment-Design-Academy.md \
Learning-Environment-Design-Brains.md \
Training-ML-Agents.md \
Training-PPO.md \
Training-Curriculum-Learning.md \
Training-Imitation-Learning.md \
Using-TensorFlow-Sharp-in-Unity.md \
Training-on-Amazon-Web-Service.md \
Using-Tensorboard.md \
Python-API.md \
Feature-Broadcasting.md \
Feature-Monitor.md \
Limitations-and-Common-Issues.md \
../unity-environment/Assets/ML-Agents/Scripts \
../python/unityagents
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we only include a portion of the files in the ../unity-environment/Assets/ML-Agents/Scripts and ignoring files like Communicator.cs and BCTeacherHelper.cs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've only included the files that the developers will be using or extending. We do need to add ALL in the future.

INPUT = ../unity-environment/Assets/ML-Agents/Scripts/Academy.cs \
../unity-environment/Assets/ML-Agents/Scripts/Agent.cs \
../unity-environment/Assets/ML-Agents/Scripts/Monitor.cs \
../unity-environment/Assets/ML-Agents/Scripts/Decision.cs

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

To generate the API reference as HTML files, run:

doxygen ml-agents.conf
doxygen dox-ml-agents.conf
8 changes: 4 additions & 4 deletions unity-environment/Assets/ML-Agents/Scripts/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ public class AgentParameters
public bool resetOnDone = true;

/// <summary>
/// Whether to enable On Demand Decision Making or make a decision at
/// Whether to enable On Demand Decisions or make a decision at
/// every step.
/// </summary>
public bool onDemandDecision;

/// <summary>
/// Number of actions between decisions (used when On Demand Decision
/// Making is turned off).
/// Number of actions between decisions (used when On Demand Decisions
/// is turned off).
/// </summary>
public int numberOfActionsBetweenDecisions;
}
Expand Down Expand Up @@ -237,7 +237,7 @@ public abstract class Agent : MonoBehaviour
int stepCount;

// Flag to signify that an agent has been reset but the fact that it is
// done has not been communicated (required for On Demand Decision Making).
// done has not been communicated (required for On Demand Decisions).
bool hasAlreadyReset;

// Flag to signify that an agent is done and should not reset until
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using UnityEditor;
#endif

/// CoreBrain which decides actions using developer-provided Decision.cs script.
/// CoreBrain which decides actions using developer-provided Decision script.
public class CoreBrainHeuristic : ScriptableObject, CoreBrain
{
[SerializeField]
Expand Down