def run():

    args = parser.parse_args()
    session = "a3c"

    cmds = create_tmux_commands(session, config.log_dir)
    print("\n".join(cmds))
    os.system("\n".join(cmds))

    if config.mode is 'on_line':

        try:
            run_to = np.load(config.log_dir+'run_to.npz')['run_to']
            game_i_at = run_to[0]
            subject_i_at = run_to[1]
            worker_running = run_to[2]
            print('>>>>>Previous run_to found, init run_to:')
            print('\t\tgame_i_at: '+str(game_i_at))
            print('\t\tsubject_i_at: '+str(subject_i_at))
            print('\t\tworker_running: '+str(worker_running))
        except Exception, e:
            worker_running = config.num_workers_one_run # this is fake to start the run
            game_i_at=0
            subject_i_at=0
            print('>>>>>No previous run_to found, init run_to:')
            print('\t\tgame_i_at: '+str(game_i_at))
            print('\t\tsubject_i_at: '+str(subject_i_at))
            print('\t\tworker_running: '+str(worker_running))

        '''record run_to'''
        while True:
            try:
                np.savez(config.log_dir+'run_to.npz',
                         run_to=[game_i_at,subject_i_at,worker_running])
                break
            except Exception, e:
                print(str(Exception)+": "+str(e))
                time.sleep(1)