def load(filename):
    """Load a saved game.
    The 1st line of the file contains the history (space-separated node names).
    The other lines contains a variable and its value separated by a space.
    """
    with open(filename, 'r') as f:
        lines = f.readlines()

    history = lines[0].split()
    dico = {val[0]: int(val[1]) for val in map(lambda x: x.split(), lines[1:])}

    return history, dico