def history_states(state):
    """
    return state's history, i.e., a list of states 
    """
    ret = []
    his = state.history.parent
    while his.depth != 0:
        ret.insert(0, his.state)
        his = his.parent
    ret.insert(0, his.state)
    return ret