Problem 1257. PONG 001: Player vs Wall, 4 Lives, Interactive download
Variation of the Original Classic PONG game brought to Cody.
Attempt to keep the ball alive against a Wall. The ball speeds up on every hit. When it is missed it restarts at a new location. The start locations and sequences are purely deterministic. Movement of the paddle are max up/down steps of -1 to 1 (effective delta 50) or no move. Partial paddle moves allowed.
Paddle center is provided and paddle covers +/- 50 units. The field is square at 1000 by 1000 with 3 walls and the lower left corner being (0,0)
To aid in development of your routine, a PONG_Interactive_001a.m file that creates a solver script and video has been posted at PONG_Interactive_001a.m. (Right click, 'save link as'). The routine creates a PONG_001_solver.m script from the interactive play. The script demonstrates Interactivity, figure/KeyPressFcn, listdlg, and VideoWriter.
PONG Interactive 63 Returns (MP4)
Inputs: (paddle,ball)
paddle = 500 ; Paddle Center on the Y-axis, Paddle is +/- 50 from center ball=[500 500 40 60]; % x y vx vy Posiiton and Velocity, Treated as a Point
Output: Direction
1 Up, -1 is Down, 0-No move Paddle moves 50*direction, half paddle step. abs(direction)<=1 is allowed
Pass Criteria: 10 hits, a score of 450 or better
Scoring: 100 - 5 * Hits + 100 * Lives, (500 - 5 * hits for < 100 hits)
Game Theory: Position Paddle to minimize travel to next location. Vx=1.1*Vx and Vy=1.05*Vy after every return.
Near Future: Paddle vs Paddle (Mirror). Followed by Angle varation based on Paddle/Ball Position
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

Matrix Patterns I
- 18 Problems
- 60 Finishers
- Pascal's Matrix
- Spot the rectangle (Part 2)
- Spot the rectangle
- Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
- Magic is simple (for beginners)
- Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
- Mirror Image matrix across anti-diagonal
- Special matrix
- Make a logical diamond using GALLERY function
- Magic is simple (for beginners)
- Create a Multiplication table matrix...
- Make a Star Pyramid
- "mirror" matrix
- Twist 'n' Match
- Create a matrix X, where each column is a shifted copy of the vector v
- Symmetric matrix
- Create a patchwork matrix
- Spiral In
- Spot the rectangle (Part 2)
- Spot the rectangle
- Matrix spiral
- Better bullseye matrix
Problem Recent Solvers10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!