finished 64-state reward function