RL_Shooter icon indicating copy to clipboard operation
RL_Shooter copied to clipboard

🤖 Creation of an RL environment with Unity, where an agent must learn to survive by moving 🦿 and shooting🔫, using ML-Agents !

🔫 Welcome to the RL_Shooter ! 🔫

https://user-images.githubusercontent.com/53370597/116051423-1db2d180-a668-11eb-8df7-dd9e61381641.mp4

In this RL project on Unity, the little green robot (the agent) has to survive as long as possible in front of red robots that run at him. If he is in contact with one of them, he loses. The agent can shoot a green bullet that bounces on the walls (5 times max), he can shoot every 2 seconds, moreover he can move and rotate freely.

Random card generation

FotoJet The map can be totally randomly generated, choosing obviously its size, the obstacle ratio (0 to 1), the number of enemies per second, the size of the obstacles etc..

Enemy chases the agent with a Navmesh

Nav Often in this kind of situation where the map is randomly generated and we want entities to be able to move in a natural way from a point A to a point B, the NavMesh is often the best solution (even if quite expensive)

Shooting

https://user-images.githubusercontent.com/53370597/116367721-2980ce00-a7f7-11eb-8623-72bd56693e7b.mp4

The agent can shoot a bullet every 2 seconds, this one must bounce in a realistic way in the environment. After a lot of tests, my last test seems to work the best, even if I'm thinking about another logic that could avoid sometimes some hazardous behavior.