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

How should classical paddle AI reacts to superposed balls? #16

Open
HuangJunye opened this issue Jul 15, 2019 · 4 comments
Open

How should classical paddle AI reacts to superposed balls? #16

HuangJunye opened this issue Jul 15, 2019 · 4 comments
Labels

Comments

@HuangJunye
Copy link
Collaborator

How would human players reacts to multiple balls in Pong? They would try to move the paddle to catch the ball which will come first. When we implement superposed balls, we should make them come to the player at slightly different time. The classical paddle AI will find the closest ball, and follow its position.

@HuangJunye HuangJunye added the AI label Jul 15, 2019
@boland25
Copy link
Collaborator

boland25 commented Aug 9, 2019

@HuangJunye can we step through the exact sequence that happens from when a player places an H gate on the screen?

  • H gate is placed on a circuit
  • classical paddle hits the ball in a direction and quantum superposed paddle hits it
    • does it measure?
  • 2 balls then start moving in different directions but at the same speed towards classical paddle
  • classical paddle must choose one ball and then it measures
  • if superposed ball measured for that ball, then ???
  • other ball goes away?

@HuangJunye
Copy link
Collaborator Author

@boland25 The sequence of events are more or less correct.

  • When H gate is placed in the circuit, superposed paddles are generated and the probability of states are represented by the transparency, just as the way it is now.
  • When a ball comes and collides with superposed paddles, the superposition is transferred to the ball. For example, if the state is (|000> + |001>)/sqrt(2), two balls will be generated with 50% probability to be measured. If the two H gates are placed, there will be 4 balls generated.
  • I am not sure about the behaviour of superposed balls after they are generated. Perhaps they should just copy exactly the direction and speed of the classical ball, but the position will be on top of the corresponding paddle (similar to what I have implemented)
  • Classical paddle should try to catch the nearest ball. When that ball enters the measurement zone, it triggers measurement, and the superposed balls will collapse and only one ball will remain.

@HuangJunye
Copy link
Collaborator Author

Once the superposed balls are generated, their state is fixed, and it shouldn’t change even if the player change the circuit after the collision.

@HuangJunye
Copy link
Collaborator Author

We should use transparency to show the probability of superposed balls too.

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

No branches or pull requests

2 participants