Text this: Adaptive Control of an Inverted Pendulum by a Reinforcement Learningbased LQR Method