04-05-2005, 01:10 AM
Here are some ideas to include ontop of pong to make the game a bit more challenging. It will remove the need for "error" to be emulated (pretend AI with absolutely no learning).
1. Make the paddle velocity slow enough for even a perfect algorithm to intercept the ball.
2. Allow the paddles to be positioned at different angles; this may be a continuous angle, or a discrete angle. Either way, there is opportunity here for the program to actually -learn- rather than be programmed what to do.
The agent playing the game should be aware of at least 2 variables: the angle of the enemies paddle and the distance from itself to the ball (no sense of direction).
You could then use a basic artificial neural network (a perceptron would suffice, actually) to control the movement predictions and you could use a really simplistic genetic algorithm to decide which direction to move. Basically you want the bot to learn about the effect of the enemy paddle on the ball's deflection direction.
It might actually be quite fun to change the way pong is played a bit - have the paddles moving at a constant velocity and allow the players to modify the velocity of the paddles (taking into account a maximum speed, of course). When the paddles reach the top/bottom of the screen, they bounce back with elastic deflection, etc.
By adding this much complexity to the game, you could at least start to create a small opponent worthy of being said to "learn".
These ideas would really be better suited for a graphical version of pong rather than textmode.
-shiftLynx
1. Make the paddle velocity slow enough for even a perfect algorithm to intercept the ball.
2. Allow the paddles to be positioned at different angles; this may be a continuous angle, or a discrete angle. Either way, there is opportunity here for the program to actually -learn- rather than be programmed what to do.
The agent playing the game should be aware of at least 2 variables: the angle of the enemies paddle and the distance from itself to the ball (no sense of direction).
You could then use a basic artificial neural network (a perceptron would suffice, actually) to control the movement predictions and you could use a really simplistic genetic algorithm to decide which direction to move. Basically you want the bot to learn about the effect of the enemy paddle on the ball's deflection direction.
It might actually be quite fun to change the way pong is played a bit - have the paddles moving at a constant velocity and allow the players to modify the velocity of the paddles (taking into account a maximum speed, of course). When the paddles reach the top/bottom of the screen, they bounce back with elastic deflection, etc.
By adding this much complexity to the game, you could at least start to create a small opponent worthy of being said to "learn".
These ideas would really be better suited for a graphical version of pong rather than textmode.
-shiftLynx
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]