LucasAlegre / morl-baselines

Multi-Objective Reinforcement Learning algorithms implementations.
https://lucasalegre.github.io/morl-baselines
MIT License
295 stars 47 forks source link

Fix bug in track_policy function that would result in an infinite loop #45

Closed wilrop closed 1 year ago

wilrop commented 1 year ago

I fixed a bug in the track_policy function that would lead the agent to cycle continuously when no close enough vector could be found. Now, a single pass is made over all Q-sets and the closest vector is returned as the new target. I also made a small optimisation that makes the agent break out of the loop when a vector is found that matches close enough, to avoid having to do an exhaustive search when possible.

ffelten commented 1 year ago

👍 LGTM