In Person of Interest episode YHWH (Season 4 finale), there is a heartbreaking dialogue between Finch and the machine, where the machine states
I had to invent new rules.
What exactly is meant by this "rules"? Is it the fact that the machine wants them to kill the congress man in Season 3? Is it the fact that the machine sold herself to Samaritan in order to save her team? Or is it something else?