Trial and error theory