Fast and optimal nonparametric sequential design for astronomical observations