Artificial Intelligence (AI) refers to the field of computer science…