Suppose you're playing against the AI - how would YOU decide which ball to go for? i.e.
Which ball is nearest?
Which ball scores the most points?...and...
...do I need that many points to win?
Which ball is easiest to get to?
Will collecting a certain ball inconvenience my opponent?
...etc.
Draw your entire AI system out on a flow diagram. You can then code it piece by piece. Much easier that way than trying to manage the entire thing in your head.
Which ball is nearest?
Which ball scores the most points?...and...
...do I need that many points to win?
Which ball is easiest to get to?
Will collecting a certain ball inconvenience my opponent?
...etc.
Draw your entire AI system out on a flow diagram. You can then code it piece by piece. Much easier that way than trying to manage the entire thing in your head.