Tutorials: Building Toolkit
[These video tutorials has been depreciated for it being difficult to maintain, please simply follow the instructions/documentations on the Github page which covers everything you need.]
Github: Arena-BuildingToolkit
[New Feature] Lidar Sensor
Lidar sensor is widely used in robots to get precise low dimensional representation of the surroundings.
Lidar sensor is suitable for robotic SLAM applications. It provides 360 degree scan field, certain rotating frequency with certain ranger distance. Lidar is the ideal sensor in cost sensitive areas like robots consumer and hardware hobbyist.
It is also recently used as a representation for game AI, see OpenAI Hide-and-seek.
[Note] When set ScanFramePerSecond to a positive number, you will still get all the data from lidar at each step, the difference is that some of the data is not refreshed, i.e., only part of data is refreshed at each step. This corresponding to the limited scan frequency of a real lidar sensor.
[New Feature] Visualize Vector Observation
After you add some vector observations to your agent, you may want to check if they make sense for the agent.
All ArenaAgent are equipped with this visualization tool by default.
It provides flexible ways to investigate/preview the vector observation.
It is only enabled in Unity editor, and will not slow down your game when it is compiled for the target platform.
[New Feature] Visualize Visual Observation
After you add some visual observations via AgentCamera prefab to your agent, you may want to check if the actual observation for agent (smaller and maybe in grayscale) makes sense.
All ArenaAgent are equipped with this visualization tool by default.
It provides flexible ways to investigate/preview the visual observation.
It is also supported in a compiled game, though not recommended, as it slows down your game.
The baseline side of Arena project provides better visualization tool for the compiled game.
[New Feature] Dynamically Change Social Tree Structure
Arena-BuildingToolkit now supports dynamically change social tree structure, during an episode, or at the reset of an episode.
This could open up an interesting research direction of multi-agent learning with agents dies or newly born dynamically. We temporally refer to this kind of problem as "social lifelong learning", in contrast to "lifelong learning" in the context of single agent learning. Say: Can the agent learns to give birth to a specific number of babies, based on the resources it has and the stage of the society / population.
[Get Started 1] Setup the Workspace [Video contains names, temporally hidden for review policy]
Setup the workspace with Unity Editor.
- Editor Version: Unity 2018.3.6f1 Personal, download here.
- ./Assets/ArenaSDK: main content of the project.
- Outside ./Assets/ArenaSDK: some temporal draft that will be cleaned up in the future.
[Get Started 2] Create a Simple One Player Game
Learn building new learning environments with few lines of code.
- Before you start, we are expecting you to have basic knowledge on Unity. Thus, you are recommended to finish the Roll-a-ball tutorial to learn some basic concepts of Unity.
- GlobalManager: manager every global settings, as the parent of everything.
[Get Started 3] Create a Simple Two Players Game
Build a two players game and understand ArenaNode.
- ArenaNode: a node in the social tree to manage the reward of its child nodes and the life cycle of its child nodes.
- ArenaAgent: each individual actual acting agent.
[Advanced] Upgrade/Change Version of ML-Agents
How to upgrade or change the version of the Unity ML-Agent dependence.
Override "Assets/ML-Agents" with the the recent ML-Agent folder here.
Apply several changes in ML-Agent:
- change "public BroadcastHub broadcastHub = new BroadcastHub();" in "Assets/ML-Agents/Scripts/Academy.cs" to "[HideInInspector] public BroadcastHub broadcastHub = new BroadcastHub();"
- change "AgentInfo info;" in "Assets/ML-Agents/Scripts/Agent.cs" to "protected AgentInfo info;"
- change "AgentInfo m_Info;" in "Assets/ML-Agents/Scripts/Agent.cs" to "protected AgentInfo info;"
[Advanced] Handling Variants of Your Games Efficiently
How to handle different configurations of your games with prefabs and prefab variants.
- Prefab - GlobalManager in "Assets/ArenaSDK/Prefabs/" handles settings of all games.
- Prefab Variant - GlobalManager Variant in "Assets/ArenaSDK/GameSet/[cool_game]/" handles settings of the specific game [cool_game].
[Reward Function] Reward Function Based on Distance
Use reward function based on distance.
Use Dense Reward Functions
Use multiple off-the-shelf dense reward functions.
Use More Agent Prefabs
Use multiple off-the-shelf agent prefabs in Arena-BuildingToolkit.
[New Agent] Snake Agent
Snake is the common name for a video game concept where the player maneuvers a line which grows in length, with the line itself being a primary obstacle. The concept originated in the 1976 arcade game Blockade, and the ease of implementing Snake has led to hundreds of versions (some of which have the word snake or worm in the title) for many platforms. See Wiki Page.
Make Your Game More Neat with Prefabs
Suggestions on how to prefab you game so that you can enjoy cleaner project.
Log Information
Identify where the log information comes from.
Set NodeID
Set valid NodeID.
Agent Camera Display Mode
Select mode of which multiple cameras are displayed in the window
- Import: come with GlobalManager.
- [Depreciated] AgentCameraDisplayMode = AgentCameraDisplayModes.All: all cameras are aligned automatically to fit in the single window.
- AgentCameraDisplayMode = AgentCameraDisplayModes.Single: one camera takes the whole window at one time, press F1 and F2 to navigate among different cameras .
UI Percentage Bar [Video contains names, temporally hidden for review policy]
Display percentage or / and value with HUD display.
- Import: Drag prefab UIPercentageBar in scene as a child of the canvas of the AgentCamera, then it is ready to use via ArenaAgent.UIPercentageBars[UIPercentageBar.ID]. Or Drag prefab UIPercentageBar in scene as a child of the canvas of the TopDownCamera, then it is ready to use via GlobalManager.UIPercentageBars[UIPercentageBar.ID].
- UIPercentageBar.ID: set an ID for this UIPercentageBar.
- ArenaAgent.UIPercentageBars[UIPercentageBar.ID].UpdatePercentage(float Percentage_): Update the percentage to display.
- ArenaAgent.UIPercentageBars[UIPercentageBar.ID].UpdateValue(float Value_): Update the percentage to display by value, the value is automatically normalized to a percentage. The min UIPercentageBar.getMinValue() and max UIPercentageBar.getMaxValue() of the value will also be displayed.