Sliding window games for cooperative building temperature control using a distributed learning method