Notifications
Article
TRAINNING A MAN GO FORWARD TO A WOMAN
Updated 8 months ago
196
0
TRAINNING A MAN GO FORWARD TO A WOMAN

The Challenge purpos is training a man go forward to a woman and avoid hit the fire ball burning.
I use curricula to make the training more smooth, the "scale" value control the fire ball size, it is 0.7 scale size at beginning and at the end it will be 6 scale size
The man agent can only get 6 float type input below:
state.Add((woman.transform.position.x - man.transform.position.x));
state.Add((woman.transform.position.z - man.transform.position.z));
state.Add((fireball.transform.position.x - man.transform.position.x));
state.Add((fireball.transform.position.z - man.transform.position.z));
state.Add(man.transform.GetComponent<Rigidbody>().velocity.x);
state.Add(man.transform.GetComponent<Rigidbody>().velocity.z);
How to give reward?
every frame let reward = -0.001f to make the process faster if the distance between fire ball and man < fire ball size, then let reward = -0.5f and set done as ture if the distance between woman and man < woman size, then let reward = 1f and set done as ture
Training result:
after Step: 200000 -- the man can turn a very small corner
after Step: 32000000 -- the man can turn a VERY BIG corner to avoid hit the VERY BIG fire ball

Thanks for your watching : )
the github link is:
https://github.com/wizim404/ml-agents-man-to-woman.git

W
WiZiM
1
Comments