This a very complex problem with often times very complex solutions, though there's nothing technically stopping you from implementing such a system in C2. It would probably be of some benefit to look at tutorials for video game AI in general -- not specifically for C2, as the important concepts are separate from implementation.
A simple system might keep track of the player's recent moves and make decisions based on that. More complex systems may use an artificial neural network to learn and adapt.