edbeeching / godot_rl_agents

An Open Source package that allows video game creators, AI researchers and hobbyists the opportunity to learn complex behaviors for their Non Player Characters or agents
MIT License
942 stars 69 forks source link

BallChase example: Does best_fruit_distance need a reset after collection? #11

Closed mischkadb closed 2 years ago

mischkadb commented 2 years ago

I am not sure if I understand the examples correctly. In the BallChase example best_fruit_distance is initialized and reset in the reset() method. But shouldn't it also be reset after every fruit collection? Only the distance reduction to the first fruit gets rewarded at the moment.

edbeeching commented 2 years ago

Good spot, this is not working as intended. It dates back to when the task was to collected one fruit and then the environment would reset I then extended the task to multiple fruits. I am planning to push a number of fixes to master today. I will aim to include this as well.

edbeeching commented 2 years ago

I've corrected this bug in the latest release. Please let me know if you spot anything else or have other questions.