nuno-faria / tetris-ai

A deep reinforcement learning bot that plays tetris
MIT License
260 stars 67 forks source link

Unable to reproduce the reported results #8

Open InoriJam opened 3 years ago

InoriJam commented 3 years ago

I retrained your model using the default hyperparameters in run.py, but my results are not similar to the reported results, the score is still too low after 2000 episodes. Could you please give me any advice to reproduce your results?

DiegoCefalo commented 2 years ago

Bumping this issue. Im barely getting more than 2000 points, even after trying different hyperparameters.

SSSKJ commented 2 years ago

Same problem. Can anyone give me some advice about it? Thanks

nuno-faria commented 5 months ago

Sorry for the delayed response. Since the learning is initially based on random plays, it could be the case that the agent never ended up choosing a good move that it could learn from. To improve the probability of higher scores, I recommend increasing the number of episodes to explore, and decreasing the batch size to make it train faster. For example:

episodes = 3000
epsilon_stop_episode = 2000
mem_size = 1000
batch_size = 128
replay_start_size = 1000 # important, must be <= mem_size so the model can be trained

In addition to this, it might also be worth creating a larger neural network:

n_neurons = [32, 32, 32]
activations = ['relu', 'relu', 'relu', 'linear']

I tested this recently and ended up reaching 300k points before stopping the process.