SubgoalDetermination script