Learning multi-dimensional rules via value-based serial hypothesis testing