The fish doesn't need to grok the entire game, it just has to be better than the other fish. (Cue that joke about two people being chased by a bear and one pausing to put on his sneakers. "What are you doing? You can't outrun a bear!" "I don't have to, I just have to outrun you!")
For example, if fish A realizes that swimming around corner X gets it food, because X happens to correspond to "move forward and punch", that's enough to win the game if fish B doesn't figure out the same.
For example, if fish A realizes that swimming around corner X gets it food, because X happens to correspond to "move forward and punch", that's enough to win the game if fish B doesn't figure out the same.