![]() ![]() It's optimized for IRC-style chat logs, but running any decent-sized text through it should demonstrate the concepts: import random, sys I wrote something a long time ago (the code to which I'm not proud of at all, and needs some mods to run on Python > 1.5) that may be a useful starting place for you: ĮDIT: Here's a minimal example in Python of a Markov Chain that accepts input from stdin and outputs text based on the probabilities of words succeeding one another in the input. ![]() You probably want to look into Markov Chains as the basics for the bot AI.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |