State to State Optimizing