From: Dss Jss Date: 2008-04-11T06:40:17+09:00 Subject: Random name generator! Hello to all; I'm testing out different ways to output randomly generated names. I've toyed with some basic algorithms but recently I've become hooked on the idea of using a Markov chain in the process to generate names based on a text file. Below is a link to my first effort - I won't even begin to start on what a catastrophe it is and I don't expect you to understand it: http://pastie.textmate.org/178820 It's hideous. I'm never going near it again. It basically looks at each line of a text file and throws the adjacent letter pairings into a big hash with probability weightings, moves through the probability hash coughing out likely letter results based on the previous entry. I think the term for it is "first-order Markov chain". What I'd like to see if anyone has any suggestions, or more importantly examples of how this should be done? I'm fairly certain there are more elegant ways about doing this. Thanks. -- Posted via http://www.ruby-forum.com/.