Intelligent Trial and Error