TK-MARS: An Efficient Approach for Deterministic and Stochastic Black-Box Optimization