In this project we have trained an evolving Neural network by using Genetic Algorithms in Unity Game Engine using the ML-agents provided by them. By repeated simulation of the agent in the environment, using this we have created an agent which learns unique features from the environment based on its input and generates a forecast permitting the vehicle to drive without requiring external commands from the player. For simplicity purposes the ability of the agents to brake or reverse was not added.
Requirement: Unity version 2022.3.8f1.
The simulation environment was chosen to be a forested environment:
Init new population:
Run game:
The following code is based on code from the SelfDrivingCarSimulation project by Varun Singh: