Re: Confused.
Don't feel bad, you're not alone in the confusion. It sounded to me that it amounted to "Did $X work? If True then remember $X else forget $x & try $y instead" repeated at random until the bot eventually figures out the sequence of $x's that completes the game.
Ooh! I wrote something a bit like that into a Battleships game (in Pascal - it was a course project) - does that mean I was doing A.I. back in 1990?