Nonconvex optimization problems are, after a relaxation, approximated numerically and an efficient multilevel adaptiv maximum-princple-based algorithm is proposed and tested.