# Need help with Pong AI

**URL:** <https://forum.kirupa.com/t/need-help-with-pong-ai/331166>\
**Category:** Uncategorized\
**Created:** [June 5, 2013, 6:25am UTC](https://forum.kirupa.com/t/need-help-with-pong-ai/331166 "2013-06-05T06:25:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_Bhalavi](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Rakesh\_Bhalavi](https://forum.kirupa.com/u/Rakesh_Bhalavi)\
**Post date:** [June 5, 2013, 6:25am UTC](https://forum.kirupa.com/t/need-help-with-pong-ai/331166/1 "2013-06-05T06:25:36Z")

</div>

I am a beginner with AS3 an I am trying to make a basic Player vs CUP pong game. I have a document class and individual classes for Ball, Player and CPU. My problem is that I don’t know how to make CPU use the co-ordinates of the ball to move with respect to it as required to form the AI. The Ball, Player and CPU are all movie clips and I have drawn them on stage. Any help is very much appreciated.
