AI as an opponent or team member is very widely used. It can play equally well or even overpower human players. But there's a reason why it's more fun to play with human players than with AI (even if AI is very good).
What task are you going to give AI?
Oh this isn't for a game I planned, just theoretical stuff.
What's the reason for online play being better?