hill-a / stable-baselines

A fork of OpenAI Baselines, implementations of reinforcement learning algorithms
http://stable-baselines.readthedocs.io/
MIT License
4.16k stars 725 forks source link

Prediction for same observation using same model #1156

Closed DaniilKardava closed 2 years ago

DaniilKardava commented 2 years ago

Hi, I've been trying to understand how .predict generates a suggested action... for the same model and same input I get completely different outcomes. Is there a way to replicate a model's performance on a data set, or is there some inherent randomness that is occasionally giving me high accuracy for my model?

Miffyli commented 2 years ago

You need to pass deterministic=True as part of the predict call :). The default is that agent samples an action from a distribution, i.e. you will get different actions.

Also we recommend moving to stable-baselines3.

Please close this issue if this answers your question.