git @ Cat's Eye Technologies NaNoGenLab / 89f2353
Just some notes. Chris Pressey 10 years ago
2 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1313 --------------
1414
1515 * Put two instances of Eliza into mutual livelock to create dialogue.
16 This was sort of inspired by
17 [Redwreath and Goldstar Have Traveled to Deathsgate](https://github.com/dariusk/NaNoGenMo/issues/10)
18 because I thought two-bots-in-livelock was what that was until it
19 was explained to me that wasn't what it was.
1620
1721 Sample Output
1822 -------------
4848
4949 def qualifiers():
5050 # we can't do the random.choice thing here because Python has eager
51 # evaluation. TODO: write a version of this in Haskell
51 # evaluation. Well, I tried to write a version of this in Haskell,
52 # but due to the fact that it needs monads for random numbers, I wasn't
53 # able to write this any more nicely. I might be able to if my
54 # monad-fu wasn't so sucky, but I'd much rather TODO: write some sort of
55 # custom evaluator that lazily evaluates probabilistic grammars!
5256 i = random.randint(1, 6)
5357 if i == 1:
5458 return ["just", qualifiers()]