Artificial intelligence (AI) is the field of study focused on creating intelligent machines. Within AI…