Sign in

Working with Reinforcement Learning, Backend web development, & Computer Vision.

Is Google Colab compatible with ML-Agents?

Check the environment details

Answer to the above question is Yes, Google Colab can be used to train our ML-Agents, and given below are the four simple steps to train any Unity environment using ML-Agents with colab.

Introduction

After struggling with a particular question (How to run ML-Agents in Google Colab?) for days, I thought it would be great to write an article to share my findings on this topic as there is little to no information on the internet. This article gives information on the above question by testing an example environment on colab. …


Now you can live stream the Gym training process from Google Colab.

I hope you got the meaning I tried to convey through this image 😅

Introducing gym-video-streamer a python package for live streaming gym agent’s learning behavior to Twitch/YouTube from Google Colab while training these agents.

In this article, I will explain how to use the gym-video-streamer to live stream the training process so you can visually find out what went wrong while training the agents ✌🏻.

Now let’s get started with the steps required to set up the Streamer on Colab.

Step 1: Installation & Imports from package

!pip install gym-video-streamerimport gym
from gym_video_streamer import SetupVirtualDisplay
from gym_video_streamer import VideoStreamer # Streaming…


Live Stream the ML-Agents training process from Colab to Twitch server.

Live streaming ML-Agents training process from google colab
Live streaming ML-Agents training process from google colab
Check out this video on training process which was live streamed from colab to my twitch server & then exported to my YT channel

A new version of this package has been released & this article is also updated according to that new version.

But still the older version is active & now it is also available on PyPI, so refer to this readme to use the older version.

And if you wish to migrate to the newer version, then refer to this doc on migration (because there are some breaking changes)

Refer to this GitHub release to know what are the new features introduced in the 2.0 version of mlagents-video-streamer

If you want to train the ML-Agents with Google Colab (without Live Streaming it) then please check Training ML-Agents with Google Colab.


Do you like to stream videos on software development on YouTube & like to share the source code via github?

Youtube Stats Card
Youtube Stats Card
Youtube Stats Card

If the answer to the above question is yes, then this article is valuable for you. Recently I created a project which dynamically generates YouTube Stats Card for the youtube channel and videos. These cards will give an aesthetic look on your Github profile readme and the repo readmes as compared to the normal youtube URL.

YouTube Stats Card allows you to simply add a markdown image link and it will show the real-time stats for your Channel and Videos…


Using ML-Agents Python lower-level APIs to training RL agents

Navigation RL Agent
Navigation RL Agent
The environment I used to train the RL agent using Unity’s ML-Agents toolkit

I am writing this article because I found that there are hardly any resources that talk about how to apply the RL algorithm to a custom environment made with the Unity engine. So if you have implemented a custom environment in Unity and used the ML-Agents toolkit for training. But now, if you want to apply PPO(or any other RL algorithm) to your environment (without using the ML-Agents inbuild trainer), then you are at the right place.

There are two additional features provided by ML-Agents:

  • Python lower-level APIs, which allows us…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store