Sign in to follow this  
LostSource

Dumb AI For Pong

Recommended Posts

I'm not sure if this has been asked before, but what the heck. = ] I know that AI for a pong game is easy to impleament, and make the NPC really smart. My question is how do you make the Pong NPC smart at times and yet stupid at other times? Because in my Pong game, it seems to be either super smart or super stupid... = / Is it possible for it to be both? Anyone have any ideas on how to make Pong AI fun? Even if you haven't coded AI yet, just general AI ideas would be cool to. Thank you ahead of time for all the help, and reply's.

Share this post


Link to post
Share on other sites
You could slow the reaction time down of the AI, say he only starts to move towards the ball when it crosses the net. That's what I would try!

Share this post


Link to post
Share on other sites
Quote:
Original post by Jemburula
You could slow the reaction time down of the AI, say he only starts to move towards the ball when it crosses the net. That's what I would try!


It's already doing that, but I have the Pong NPC acting like a human to some what. Like say after you hit the ball back towards the other player, normally the player will move back to the middle of the screen and get ready for the next play. Well that's what the Pong NPC is doing. Acting like we would.

Quote:
Original post by Kalasjniekof
Use a random number to check if the AI should act smart or dumb. Just don't make it too obvious for the player...


I'm going to try that tonight... ummm, well this morning now. = ]

Share this post


Link to post
Share on other sites
The biggest problem is that the AI won't play like humans. It won't mess up and miss, except in the cases where it can't reach the ball because of a delay. The way I'd do it is to fuzz up the information the AI gets on the ball position.

Share this post


Link to post
Share on other sites
I would do it this way:
When ball reflects increase ball speed.And the dificulty level will affect only computers response time.So if AI delay time is long it has more chance to miss the ball.And of course this will be ( i think so ) more realistic cos whatever delay time AI has it will hit the very slow balls .So dificulty level will be only AI delay time which you must tweak acordingly. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by erjo
The biggest problem is that the AI won't play like humans. It won't mess up and miss, except in the cases where it can't reach the ball because of a delay. The way I'd do it is to fuzz up the information the AI gets on the ball position.


on that note:
if i were to have the an ai try to play pong, i would have it try to always keep the ball on the paddle (in terms of y) so give the ball's location +/- a rand number. this way it'll still try to follow the ball (as we as humans do) but it won't know just where the ball is. this should make it miss from time to time, but still make it look as if the ai is trying.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this