Text this: Function approximation method based on weights gradient descent in reinforcement learning