Formalanalysisandempiricalevaluationoftemporal-differencelearningalgorithms