ab316 / opennero

Automatically exported from code.google.com/p/opennero
Other
0 stars 0 forks source link

Stick together and approach enemy sliders have no effect on learning. #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start up the Nero mod and change the stick together and/or approach enemy 
slider to a nonzero value.
2. Spawn a turret and some agents.
3. Read the output and see that the champion agent has a fitness of 0

line 305 of NeroEnvironment.py

What is the expected output? What do you see instead?
The expected output is for the champion agent to have a nonzero fitness and for 
some learning to take place. Instead, the champion has a zero fitness and no 
discernible learning takes place.

What version of the product are you using? On what operating system?
1312 on a machine in the CS labs.

Please provide any additional information below.
We found the source of the problem in NeroEnvironment.py, line 305. It 
mistakenly uses
R[constants.FITNESS_STAND_GROUND] = -d*d
instead of
R[constants.FITNESS_STICK_TOGETHER] = -d*d
To assign the reward for sticking together. Fixing this fixes the bug.

Original issue reported on code.google.com by McHob...@gmail.com on 3 Nov 2011 at 8:40

GoogleCodeExporter commented 9 years ago
r1316 should fix this as suggested

Original comment by ikarpov on 4 Nov 2011 at 12:04