Frames, database with environment and action, relate error to correction action