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)
|
trainer.trainFromTerm(run.head)
|
||||||
print('[!] I have become smart! Destroyer of human Ultimate-TicTacToe players! (Neuristic update completed)')
|
print('[!] I have become smart! Destroyer of human Ultimate-TicTacToe players! (Neuristic update completed)')
|
||||||
if remember:
|
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('[!] 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('[!] This marks the beginning of the end of humankind!')
|
||||||
print('[i] Thanks for playing! Goodbye...')
|
print('[i] Thanks for playing! Goodbye...')
|
||||||
|
@ -151,7 +151,7 @@ class QueueingUniverse(Universe):
|
|||||||
try:
|
try:
|
||||||
yield self.pq.get(False).data
|
yield self.pq.get(False).data
|
||||||
except Empty:
|
except Empty:
|
||||||
time.sleep(1)
|
return None
|
||||||
|
|
||||||
def activateEdge(self, head):
|
def activateEdge(self, head):
|
||||||
head._activateEdge()
|
head._activateEdge()
|
||||||
@ -379,13 +379,15 @@ class Worker():
|
|||||||
|
|
||||||
def runLocal(self):
|
def runLocal(self):
|
||||||
for i, node in enumerate(self.universe.iter()):
|
for i, node in enumerate(self.universe.iter()):
|
||||||
|
if node==None:
|
||||||
|
time.sleep(1)
|
||||||
if not self._alive:
|
if not self._alive:
|
||||||
return
|
return
|
||||||
node.decayEvent()
|
node.decayEvent()
|
||||||
|
|
||||||
def kill(self):
|
def kill(self):
|
||||||
self._alive = False
|
self._alive = False
|
||||||
self.thread.join()
|
self.thread.join(15)
|
||||||
|
|
||||||
def revive(self):
|
def revive(self):
|
||||||
self._alive = True
|
self._alive = True
|
||||||
|
Loading…
Reference in New Issue
Block a user