Smooth reward calculation for nice gradients - #729
Conversation
|
Smoothing the reward sounds like a great idea in general and this might come handy for a lot of cases. Still I think there might be an issue regarding price setters: As a result price setters might not choose to do so because the global optimum (max reward) is at a way lower price. Currently I am not sure how to fix this other than just capping the smoothing function at 1/2.
|
|
So this smoothing will always lead to an error... Naturally, but the one you @reinecfi are showing seems quite structurally problematic. What we could do is shift the sigmoid function to the right, so that it is in fact the actual reward once we are in the market. This would shift the error toward situations where we are not in the market, which should distort the reachable maximum less. |

Description
The current reward calculation in
EnergyLearningStrategyuses a hard threshold (step function) to determine whether a bid is accepted or not. This creates:In another study, I replaced a nasty binary with a sigmoid, and it did miracles.
Replace the discrete acceptance logic with a smooth sigmoid-based acceptance probability that provides:
In
EnergyLearningStrategy.calculate_reward():Checklist
docfolder updates etc.)Testing
Compared it for example_02a (green and grey with sigmoid) and example_02b (oragne and blue with sigmoid)
For an agent that sets the market price as in example_02a, it does not have any effect besides a differently scaled reward. As you can see the profit behavior is identical. However, for many agents who are supposed to bid their marginal costs most of the time, they seem to find it quicker and stay close to their marginal costs.