Model Learning Algorithm