Eric Berne, a Canadian-born psychiatrist, created the theory of transactional analysis, in the middle of the 20th century, as a way of explaining human behavior .
Games are often characterized by a switch in roles of players towards the end.