Results 1 to 3 of 3

Thread: pong AI

  1. #1

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125

    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 errorCall to undefined function: forcepost() in /usr/local/etc/httpd/sites/vbforums.com/htdocs/newreply.php on line 66 
    <removed by admin>

  2. #2
    Lively Member
    Join Date
    May 2000
    Posts
    84
    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.

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    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
  •  



Click Here to Expand Forum to Full Width