In a program that iteratively generates policies, each of which prescribe an action to take in every possible state of a game with relative few (less than 1000) states, I want to compare two successive policy iterations, counting the number of states with differing prescribed actions between the two. In other words, I'm trying to do something like the erroneous line 16 in
pastebin.com/WgubWTY7, but I can't seem to get the syntax correct. What is the right way to express this?