Smashed bug with thread
This commit is contained in:
parent
9a187cc3ed
commit
7217bc04b3
BIN
brains/uttt.pth
BIN
brains/uttt.pth
Binary file not shown.
@ -197,7 +197,7 @@ def humanVsAi(train=True, remember=True):
|
||||
trainer.trainFromTerm(run.head)
|
||||
print('[!] I have become smart! Destroyer of human Ultimate-TicTacToe players! (Neuristic update completed)')
|
||||
if remember:
|
||||
trainer.saveToMemoryBank(term)
|
||||
trainer.saveToMemoryBank(run.head)
|
||||
print('[!] Your cognitive and strategic destinctiveness was added to my own! (Game inserted into memoryBank)')
|
||||
print('[!] This marks the beginning of the end of humankind!')
|
||||
print('[i] Thanks for playing! Goodbye...')
|
||||
|
@ -151,7 +151,7 @@ class QueueingUniverse(Universe):
|
||||
try:
|
||||
yield self.pq.get(False).data
|
||||
except Empty:
|
||||
time.sleep(1)
|
||||
return None
|
||||
|
||||
def activateEdge(self, head):
|
||||
head._activateEdge()
|
||||
@ -379,13 +379,15 @@ class Worker():
|
||||
|
||||
def runLocal(self):
|
||||
for i, node in enumerate(self.universe.iter()):
|
||||
if node==None:
|
||||
time.sleep(1)
|
||||
if not self._alive:
|
||||
return
|
||||
node.decayEvent()
|
||||
|
||||
def kill(self):
|
||||
self._alive = False
|
||||
self.thread.join()
|
||||
self.thread.join(15)
|
||||
|
||||
def revive(self):
|
||||
self._alive = True
|
||||
|
Loading…
Reference in New Issue
Block a user