|
-
May 15th, 2001, 11:35 AM
#1
Thread Starter
PowerPoster
pong AI
Since I can't reply to my previous post, I am going to ask this in a new thread. How can I make a stupid pong AI? I tried making one but it is too intelligent. It never misses. I need it to be stupid sometimes so that it misses and the player has a chance.
Thanx
P.S. John/James:
What's this all about?
PHP Code:
Fatal error: Call to undefined function: forcepost() in /usr/local/etc/httpd/sites/vbforums.com/htdocs/newreply.php on line 66
-
May 15th, 2001, 02:08 PM
#2
Lively Member
There are many ways to simulate a semi-realistic computer opponent.
I havn't tried any of these but they many work. I assume you have a maximum speed at which the paddle can be moved.
-> Have the computer make guesses where the ball will cross his end whenever the ball bounces off a new surface. Each time apply a variance variable that will offset the guess by a little.
->Give the computer a random reaction time delay before a guess is made, thus it might react too late. (With paddle speed the computer can move to the guess spot in time)
The higher the variance variable and reaction delay the worse the computer will perform.
-
May 15th, 2001, 03:32 PM
#3
Good Ol' Platypus
I've used the 2nd approach before and it works very well, tried to implement the first one but failed...
But that's years behind me...
The only thing wrong with the 2nd approach is that it gets a bit programmatic.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|