The controller performs an action in response that then results in an effect to some external system: its environment. The change is then detected by the sensors, which affect the controller, and so on, in a loop. Cybernetics was the first attempt at understanding intelligence in this way, and those such as Grey Walter who tried to build cybernetic systems were making the first electronic artificial intelligences.