Artificial intelligence is the study and design of intelligent agents, where an intelligent agent is a system that perceives its environment and takes actions that maximize its chances of success. Some key subfields of AI include knowledge representation, machine learning, program synthesis, automated reasoning, automated planning, and combinatorial search. Cognitive science is a related field that studies intelligence and cognitive functions in humans and other animals.