LEARNING, GAMES AND OPTIMALITY: ALGORITHMS FOR DECISION-MAKING IN COMPLEX ENVIRONMENTS