Methods of Machine Learning and their Application. The Basics of Markov Decision Processes and Reinforcement Learning