Text this: Optimal Defense Strategy Selection Algorithm Based on Reinforcement Learning and Opposition-Based Learning