import pickle
from biasedPerceptron import BiasedPerceptron, diff
import anotherStatus as fw
import calling_station
import betting_station
import time
import numpy as np

name = 'frenzy_perceptron_.0005_vs_frenzy.p'
start = time.time()
ALPHA = 0.0005
LAMBS = [0.8, 0.85, 0.9, 0.95, 1]
n_train = 500000

csBot = calling_station.Calling_station()
bsBot = betting_station.Betting_station()
for LAMB in LAMBS:
    net = BiasedPerceptron(fw.n_in,
                           fw.n_hidden,
                           fw.n_out,
                           alpha=ALPHA,
                           lamb=LAMB,
                           randomInit=True)
    net2 = BiasedPerceptron(fw.n_in,
                            fw.n_hidden,
                            fw.n_out,
                            alpha=ALPHA,
                            lamb=LAMB,
                            randomInit=True)
    auto = fw.AnotherAutoPlayer(net, name="superbot")
    ai = fw.AnotherAutoPlayer(net2, name='cpu', frenzy=1)
Exemplo n.º 2
0
import pickle
import UnbiasedNet
import anotherStatus as fw
import calling_station
import betting_station
import time
import numpy as np

name = 'frenzy_vs_betting.p'
start = time.time()
ALPHA = 0.001
LAMBS = [0.75]
n_train = []

callBot = calling_station.Calling_station()
bsbot = betting_station.Betting_station()
for LAMB in LAMBS:
    net = UnbiasedNet.NeuralNet(fw.n_in,
                                fw.n_hidden,
                                fw.n_out,
                                alpha=ALPHA,
                                lamb=LAMB,
                                randomInit=True)
    auto = fw.AnotherAutoPlayer(net, name="superbot")

    distance = 10
    i = 0
    while distance > 0.0002:
        oldnet = auto.net.deepcopy()
        auto.net.alpha /= 1.01
        auto.train(1000, bsbot, debug=0, frenzy=1)