Fix saving and loading
This commit is contained in:
parent
4fc83cff57
commit
32e320b820
1 changed files with 2 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import sys
|
import sys
|
||||||
|
import json
|
||||||
import random
|
import random
|
||||||
|
|
||||||
class Markov:
|
class Markov:
|
||||||
|
|
@ -29,6 +30,7 @@ class Markov:
|
||||||
before = random.choice(list(self.matrix))
|
before = random.choice(list(self.matrix))
|
||||||
|
|
||||||
selection = self.matrix[before]
|
selection = self.matrix[before]
|
||||||
|
print(repr(before), repr(selection))
|
||||||
choice = random.randrange(sum(selection.values()))
|
choice = random.randrange(sum(selection.values()))
|
||||||
|
|
||||||
counter = 0
|
counter = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue