In our thesis we present an approach for programming enemy characters in online multiplayer games that is based on machine learning algorithms. We wish to demonstrate, that it is possible to specify the available actions for specific characters, implement sensing of their environment and let them learn the tactics on their own, by fighting human players. Approaches based on machine learning have the potential to reduce the time needed for programming as well as enable the characters to adapt to current player tactics, without any additional programming. By using such programming methods we are able to create characters which get better over time and are not vulnerable to exploitation of established tactics by the players. We have focused mainly on reinforcement learning and evolutionary algorithms, because both approaches are suitable for use in systems that learn from numerous interactions with human players. We have implemented our prototype in the Unreal Engine 4 game engine.