Setting Reward Function - PathmindAI/nativerl GitHub Wiki
The reward function is set using the environment variable below (see run commands).
export REWARD_TERMS_SNIPPET='rewardTermsRaw[0] = after.goalReached - before.goalReached;'

Please keep the following in mind:
- You will need to set this manually for each training.
- You may utilize Java math classes in the reward function.
- You can also stack rewards (e.g. multiple reward variables) as you wish.
As you can see, it can be tedious to write complex reward functions using this interface. Unfortunately, this is the only option with NativeRL at the moment.