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

Why/when does zero_reward(): get called? #63

Closed Jetpackjules closed 1 year ago

Jetpackjules commented 1 year ago

Before getting to the problem, I want to say that I really appreciate the help provided, and that the project I am currently wokring on would be completely impossible without it. Thank you, really.

Here's my question: what/why is func zero_reward():?

I am logging the reward of my indiviudal agents, and have noticed that it seems to get zeroed almost whenever htey pick up the object that would give them reward points anyays. When does the code call this reward, and is this normal behavior? If not, what can I change to rectify it?

Thanks in advance!

edbeeching commented 1 year ago

This is called in sync.gd, when the reward is sent from Godot to Python. I am in the process of simplifying the creation of new environments with an ai_controller node, which will hide a lot of this so users can focus on observations and actions. The feature is there, I just haven't added the docs yet.

Jetpackjules commented 1 year ago

Ah ok, thanks