As Fizzer said in [this thread](
http://warlight.net/Forum/Thread.aspx?ThreadID=2489),
|>It will only attack teammates in two circumstances. First, if a bonus is entirely controlled by teammates and it has >= 50% of the territories, and it will only do attacks of 2.
|>Second, if it's expanding into a new bonus that no teammates control. I can't remember why it attacks teammates here, this might be a bug. Unfortunately though it's not a good idea to do incremental changes to the AI since it would invalidate everyone's single player scores, so fixing this will have to wait for a major AI revamp.