Remove unreachable states

Remove unreachable states from state machine at various intervals,
as the agent would try to reach unreachable states.