Added new methods for AI.