Exemple #1
0
            print(s)

        env.close()

        if close:
            break

    return score


if __name__ == "__main__":
    # init ES
    e = es.EvolutionStrategy(
        outw,
        1.0,
        50,  # much smaller than distributed 
        15,
        min_sigma=1e-3,
        big_sigma=5e-2,
        wait_iter=100000)

    # multiprocessing
    pool = mp.Pool()

    LENGTH = 1000
    times = 0
    best = -float('inf')

    try:
        for i in range(1000):
            scores = []
            pop = e.ask()
Exemple #2
0
            print(s) 
        
        env.close() 

        if close: 
            break 

    return score / n

if __name__ == "__main__": 
    # init ES 
    e = es.EvolutionStrategy(
        outw, 
        1.0, 
        100, 
        10, 
        min_sigma=1e-3, 
        big_sigma=1e1, 
        wait_iter=5
    )

    # multiprocessing 
    pool = mp.Pool() 

    LENGTH = 1000
    times = 0 
    best = -float('inf') 

    hist = open('car_es_hist.txt', 'w')  

    try: 
Exemple #3
0
            print(s) 
        
        env.close() 

        if close: 
            break 

    return score / 3

if __name__ == "__main__": 
    # init ES 
    e = es.EvolutionStrategy(
        outw, 
        1.0, 
        1000, 
        15, 
        min_sigma=1e-3, 
        big_sigma=5e-2, 
        wait_iter=100000
    )

    # distributed training 
    pool = distrib.DistributedServer() 
    pool.start() 

    print("Waiting for connections...") 
    time.sleep(5) 
    print("Done!") 

    LENGTH = 1000
    times = 0