The bigger the group, the larger is your bonus. When you pop them, everything above them or around them collapses in on them. Bonuses increase depending on how many gems you detonate. At the end of every level the more cleared lines you have the higher your end level bonuses are.
Your aim is to detonate the groups of 3 or more games of the same color.
Let's start to understand the structure of game AI systems by taking a virtual microscope and looking inside a single AI entity. It can be a Quake enemy, an Age of Empires army, or the creature from Black & White. Understanding the major building blocks will later help you structure and code your systems efficiently.