Heuristic calculator