ATG’s promotion engine is pretty advanced and relatively easy to use for creating promotions as described in their Creating Promotions section in the Commerce Programming Guide.
ATG’s documentation gives numerous examples of how to create buy N get M free promotions.
For example to create a simple Buy 2 Get 1 Free promotion one would create the following rule.
“For next 2 items whose product is in the category named Foo, discount up to 1 item whose product is in the category named Foo”
The only issue with the above rule is that you cannot set conditions on customers. If you need to set conditions on customers then you have create a rule like this.
“When order contains at least 3 items whose product is in the category named Foo and at most 5 items whose product is in the category named Foo and customer’s name is Frank, discount up to 1 item whose product is in the category named Foo”
Note you will have to create separate promotions for each level, i.e. one for the 3 for 1, one for the 6 for 2, one for the 9 for 3, etc.
Also if you change a promotion I believe you have to restart the ATG server otherwise at least the current customers will still be using the old promotion.