A trainer is a software tool that modifies the game's behavior, allowing players to access various cheats and advantages. Trainers are often used to gain an edge in games, especially in strategy games like Total War: Shogun 2.