>> I am wondering that what kind of real life problems could be modelled this way.
Driving a car? Making a taco? Working the checkout counter?
So could you define an cost function for these activities?
I suspect setting up motivations for the AI is going to be a big research issue before too long. If you can write a simulator for the task you want to it solve, you should be able to train it. Often writing the simulator is much easier than solving a task itself. For example, the atlas robot, then can simulate it but struggle to control it.
Keeping someone entertained in a game, the longer they play the more reward you give it. I was also thinking of hooking up a face recognition system, so it can be rewarded when the user smiles.