fixed end of game checking
classification but not integrated with qlearning