Unity(ML-agents) for Imitaion Learning.

ML-agent supports two types of learning:

1.RL:Learns by getting rewards.

2.Imitation:Learns by imitatating what the player does.

Imitation  learning is how you teach your ai directly how to behave in order to  achieve  a certain goal.

Firstly,set up the scene with some randomness,so that the ai doesn't know how to solve just one specific set of positions,so we randomize 

Two types of imitation learning that you can use [GAIL,BC]

BC - Behavior Cloning//行为克隆是最简单的模仿学习

GAIL-Generative Adversarial Imitation Learning,the goal of the discriminator is to figure out if a certain action  came from the agent or from the demo.so essentially over time our agent will learn how to behave like the demo in order to trick the discriminator.

GAIL works by trying to trick a discriminator  into pretending  that the  actions came from the demo,whereas BC simply  tries to copy  exactly what you did ,the limitation of the BC is that it can never get better than the demos.So in order to get the best results,we need to  combine  all three.

First use BC ,it learns to act exactly like you,then when  combined with GAIL,it learns to act similarily to you while achieving the same goal,and when combined  with extrinsic rewards,it continues improving  upon those two,that's how we get superhuman learning .

Visualization in tensorboard 

Personally Speaking:

I have watched some basic project completed by ml-agents.Personally speaking,it feels like 

Reference

【Unity 教学】【中字】教你的人工智能!使用 Unity ML-Agents进行模仿学习!_哔哩哔哩_bilibili

(269条消息) 模仿学习笔记:行为克隆_UQI-LIUWJ的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/weixin_43332715/article/details/129963590