Name/language generation
Oliver Jowett
oliver at sa-search.massey.ac.nz
Wed Jun 18 15:21:40 CEST 1997
I have a sneaking suspicion that I've seen discussion on this before, but
FWIW..
I'm slowly setting up a system where some NPCs (not the major ones, and
not the minor - ie. animal-level - ones) are generated with unique names,
physical characteristics, and personalities. As part of this I need some
way to generate random names or words in a specific language.
Currently what I'm trying is to construct a probability tree from a chunk
of the language in question. The tree consists of the probability that a
particular chain of letters occurs in the language, including both start
and end of word as a "letter". It generate names by matching as much of
the existing name as it can against the tree, then picking a letter based
on the probabilities at the end of the match.
For example, assuming that the generated name so far is Sol, and there are
probability chains for |-s-?, s-o-?, and o-l-? (| indicates
start-of-word). |-s matches, but the tree is exhausted before the end of
the name is reached. s-o also matches, but the same problem exists. o-l
matches, and is long enough. Then, based on the stored probabilities for
letters occuring after o-l, it picks the next letter.
This works marginally well, but a lot of the names generated aren't
acceptable. With some massaging (limiting repetition of letters, etc), I
get better results, but that limits the range of languages that can be
generated - and even then, they're not satisfactory.
Seeded with /usr/dict/words for probabilities, typical output is:
Reatuer
Panier
Elliaf
Nvalmo
Rott
Cess
Igner
Somkier
Yonesi
Elleliy
Ighvad
Erig
Ttees
Qunqu
Racf
Any suggestions for improving this?
-Oliver
More information about the mud-dev-archive
mailing list