added cost estimator with exponentially weighted average updates (aka learning)