Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random Choice when doing prediction #12

Open
HeshamMahrous opened this issue Jul 11, 2021 · 4 comments
Open

Random Choice when doing prediction #12

HeshamMahrous opened this issue Jul 11, 2021 · 4 comments

Comments

@HeshamMahrous
Copy link

I am not sure why you you did the random prediction this way action = np.random.choice(self.action_space, p=prediction) also you are picking the random outcome as the chosen action during testing and training. I can understand why during training but why during testing as well ?

@pythonlessons
Copy link
Owner

You right, I shouldn't do this while testing

@HoaxParagon
Copy link

I don't think it's wrong if you look at the way that the choice method works. It selects one of the actions based on the probability set by the prediction. The reasoning for it in training makes sense but for testing I can't be sure. It does seem like it might randomly choose something that will cause it to lose.

@kitmir
Copy link

kitmir commented Sep 5, 2021

I realised this also and tried different things.
Random choice works well with training but testing becomes better with a number.
Best result I could achieve was to make the action when the probability/prediction is more than 67%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@HeshamMahrous @pythonlessons @kitmir @HoaxParagon and others