Changing the way reward is given so that agent performs well.#16
Changing the way reward is given so that agent performs well.#16satinder147 wants to merge 1 commit into
Conversation
When I trained your model for the first time, I saw that the agent was not buying anything on actual data. I made some changes to the way, the reward was given. I have tested it on a few stocks and I am getting descent profits.
|
This is a really good idea but do you think that maybe variables a and b should be part of the state of the agent? Without it, the agent doesn't know why you give him a penalty (reward) of -200 and that penalty could be considered as the wrong action at the moment for a particular state S without knowledge of previous actions |
|
@eneszv as far as I know, the accuracy of a reinforcement learning agent depends upon the design of the reward function. The reward function used by the original author is no doubt good, I modified it only so that it converges faster. In reality, we should not be providing state variables (like a and b) because they put constraints on what the agent can learn for eg the use of a and b forced the agent to buy things, but sometimes it may not be the most optimal things to do at a given point of time. |
When I trained your model for the first time, I saw that the agent was not buying anything on actual data. I made some changes to the way, the reward was given. I have tested it on a few stocks and I am getting descent profits.