Now bug gone?
This commit is contained in:
parent
256a9af3ed
commit
ad14f70347
@ -189,7 +189,7 @@ class Model(nn.Module):
|
||||
def humanVsAi(train=True, remember=True):
|
||||
init = TTTState()
|
||||
run = NeuralRuntime(init)
|
||||
run.game([0,1], 4)
|
||||
run.game([0,1], 3)
|
||||
|
||||
if remember or train:
|
||||
trainer = Trainer(init)
|
||||
|
@ -12,6 +12,8 @@ from queue import PriorityQueue, Empty
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any
|
||||
import random
|
||||
import datetime
|
||||
import pickle
|
||||
|
||||
class Action():
|
||||
# Should hold the data representing an action
|
||||
@ -416,7 +418,7 @@ class Runtime():
|
||||
return
|
||||
raise Exception('No such action avaible...')
|
||||
|
||||
def turn(self, bot=None, calcDepth=7):
|
||||
def turn(self, bot=None, calcDepth=3):
|
||||
print(str(self.head))
|
||||
if bot==None:
|
||||
c = choose('Select action?', ['human', 'bot', 'undo', 'qlen'])
|
||||
@ -589,5 +591,5 @@ class Trainer(Runtime):
|
||||
|
||||
def saveToMemoryBank(self, term):
|
||||
with open('memoryBank/uttt/'+datetime.datetime.now().strftime('%Y-%m-%d_%H:%M:%S')+'_'+str(int(random.random()*99999))+'.vdm', 'wb') as f:
|
||||
pickel.dump(term, f)
|
||||
pickle.dump(term, f)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user