Scientific analysis of normal and abnormal behaviour, in the tradition of behavior therapy, has been forced to exclude any process occurring inside the black box, for its impossible observation and reproduction. We suggest that artificial intelligence - the science devoted to the study and reproduction of intelligent behaviors - may change this state of affairs, as it proposes itself as a new method for the validation of psychological theories. It is true that the cognitive function under examination remains unobservable, but if it has been completely reproduced in a program, from the input, through its itermediate states and processes, to the final output, one is allowed to claim to have obtained scientific evidence in favour of the theory postulating that function. The operational criteria of equal performance and of equivalent procedure, realized through a computer program of simulation, may be favourably compared to the positivistic criteria of observability. Finally, it is explained that artificial intelligence has no ambition to substitute psychology, but rather to become a necessary (not sufficient!) constraint for a science of human mind and behaviour.