Try asking it if a previous move was legal. Or why it decided to do the move.
The problem is not a failure to understand the rules. It is just not very good at maintaining the state.
that would be the optimal rule :) We usually optimise to improve and learn better and better rules, hopefully approximating the optimal rule after some iterations. There's still a gap here, but hopefully it can be closed by improving the models, training algorithms etc.