Refactoring. Creating ArtificialIntelligence interface.