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

There is a fixed pattern in the "Pong" version #8

Open
Zeta36 opened this issue Feb 23, 2016 · 1 comment
Open

There is a fixed pattern in the "Pong" version #8

Zeta36 opened this issue Feb 23, 2016 · 1 comment

Comments

@Zeta36
Copy link

Zeta36 commented Feb 23, 2016

As long as in the file https://github.com/asrivat1/DeepLearningVideoGames/blob/master/Wrapped%20Game%20Code/pong_fun.py#L82, you have:

if self.bar2_y < self.circle_y + 7.5:
self.bar2_y += ai_speed
if self.bar2_y > self.circle_y - 42.5: #Here!!
self.bar2_y -= ai_speed

That means that the classical IA will always fail in the same upper corner of the screen, and as you always start the game in the same velocity direction (7.,7.) after every game, there is a easy pattern that uses the NN to train and beat in the game always in the same way.

If you correct this line, for example, and change pong_fu.py to:

if self.bar2_y < self.circle_y + 7.5:
self.bar2_y += ai_speed
if self.bar2_y > self.circle_y - 7.5: #For this
self.bar2_y -= ai_speed

The classical IA will not fail so much, and you can check that the best pong saved netowork (pong-dqn-1380000) is not so good playing as you can imagine. That's because the NN learned to find that error pattern in bar2, instead of learning to play any real game.

@WhiteHatArpit
Copy link

@Zeta36 If you would make such changes in the game, I suppose you would have to train the network again from the start.

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

2 participants