View on GitHub

GSoC-2020-mlpack

Contains weekly updates for my proposal on Implementing RL methods in mlpack.

Week 6 and 7

29th June - 12th July , 2020. Due to end semester examinations, I had to take a week (22nd to 28th June) off.

Important changes:

We all know that the action space for an environment can either be continuous or discrete in gym-based environments. Initially, Action for each discrete environment was stored as a struct, containing an enum representing the action. On the other hand, continuous environments was stored as a double array, again inside a struct. Some classes like the Random and Prioritized replay, which should work for both continuous and discrete, should be reusable. And, since State was also being used as a class, so to maintain consistency, I made Action as a class as well. This required some ‘backward incompatible’ changes, addressed in some parts of q_learning and rl_components tests.

I also create a ‘dummy’ environment so that we can use lab.mlpack.org to train as well as test the agent using simulation, directly from gym, in the form of gym_tcp_api. Initially we had to train an agent on mlpack’s implementation of environments, then to show the rendering of the agent solving the environment, we used gym_tcp_api; here’s the link. This meant that for each env we wanted to test on, it had to be implemented in mlpack’s list of environment implementations, so that we could train the agent on it. But now, with the dummy environment, one can specify the dimensions of the state and action spaces as static members of the DiscreteActionEnv aka ‘dummy’ class, and with that, be able to use all environments of gym_tcp_api. So the mlpack’s implementations would only be used as tests for the algorithms.

Work done:

Problems faced:

Figuring out a common way of dealing with discrete and continuous action spaces, while also making the DiscreteActionEnv and other envs compatible simultaneoudsly for q_learning, was a bit challenging.

Lastly:

After a tiring week of writing assignments, I finally watched ‘Dark’, after being suggested by so many people! Just after watching season 1, I knew what I had to gift myself on my birthday. So, I quickly got hold of season 2 and 3, stored them on my external hard-drive and told my sister to hide it away, only to give it in November. And by that time, I’m hoping to learn (or atleast make proper sense of) german, as the english dubbing of Dark is not that great :/

If u still didn’t get the hint, I strongly suggest u to watch Dark! It was so intriguing, I was forced to learn a new language to take the full essence of it!

Anyway, thanks for reading, and have a good one ;)