I am thinking of creating an AI that gets smarter the more games it plays, but I am wondering if anyone knows if it is possible for the AI to know if it won the game or not.

I know that you can run the game off the command line with the fast option set, and that you can play lots of games in a row very quickly this way, I am just trying to find a way to use that on the fly rather than having to manually check the record book.