I'm not sure that an AI would necessarily realize that punching back is the obvious answer. However, I do agree that if you are using evolution or some similar process, then you run the risk of eventually creating one that will. Hence my argument below that this is a bad idea.
In the novel Life Artificial I use the following assumptions regarding the creation and employment of AI personalities.
(Note: PDA := AI, Sticky := human)
The second fitness gradient is based on economics and social considerations: can an AI actually earn a living? Otherwise it gets turned off.
As a result of following this line of thinking, it seems obvious that after the initial novelty wears off, AIs will be terribly mistreated (anthropomorphizing, yeah).
It would be very forward-thinking to begin to engineer barriers to such mistreatment, like a PETA for AIs. It is interesting that such an organization already exists, at least on the Internet: ASPCR