This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-09-25 05:19:24

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Pong AI

Looking for an AI for use with pong


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#2 2012-09-26 11:18:41

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Pong AI

I made a pong AI. Let me check.


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#3 2012-09-26 11:28:50

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Pong AI

Here is a script for the pong AI. Sort of looks right.

when I receive [Play AI v]
forever 
if <[y position] of [pong ball v] < (xposition)>
change y by (-2)
end
if <[y position] of [pong ball v] > (xposition)>
change y by (2)
end


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

Board footer