Temple of The Roguelike Forums
Development => Programming => Topic started by: sokol815 on March 08, 2013, 04:35:43 AM
-
I have always had a problem with generating names for my games. And I have never found a name generator that worked just the way I wanted. So.... I made a program that is able to generate names.
It uses Markhov chains to put together plausible groups of letters and create names.
All it requires is a word dictionary to base the chains on... I have been using a 80,000 word or so publicly available dictionary.
You can add conditions to the names (like it has mal,r or doesn't have i) and it will keep generating names until it comes up with a batch of names matching your criteria.
This is a program that I threw together today. I have seen some great things from it.
For example, I wanted to get some plausible names of resources, so I made the condition to have 'ite' in it. here are some results:
dulsite, mulenite, jacite, prambite, ascretinite, tritemy...
or evil sounding names ('mal,r') and others
glumallor, malveor, zamalar, kremald, sarmal, insaurg, kebishiz, cudshizar
alien sounding names:
poloma, koloosa, spolost, sorolow, gologum
sciences:
honcology, egology, blabology, gloxidology, aeology
anyways... it is pretty darn fast for the most part (unless you are looking for groups of 5 characters in a row... then it will probably fail out)
it will even ask you if you want to save out the names you just generated to a .txt
If anyone would like to give it a whirl, I have the .exe available here: https://docs.google.com/file/d/0B6Mkqzx3je6XOVo5cDFqVTBZejQ/edit?usp=sharing (https://docs.google.com/file/d/0B6Mkqzx3je6XOVo5cDFqVTBZejQ/edit?usp=sharing)
Happy hunting! Let me know what you think about it.
-
That's neat. Thanks.
-
You bet. I hope people find it helpful to overcome writers block and things like that.
What methods do others use to make names for characters/spells/what have you?
-
You bet. I hope people find it helpful to overcome writers block and things like that.
What methods do others use to make names for characters/spells/what have you?
I've just implemented the algorithm by JLund3 (http://roguebasin.roguelikedevelopment.org/index.php?title=Names_from_a_high_order_Markov_Process_and_a_simplified_Katz_back-off_scheme) from the RogueBasin wiki, using a "higher order
markov process and a simplified Katz back-off scheme". It lets you fine tune the randomness pretty well and is supposedly better when you have a very small sample of data. I tested it with a (large) list of Roman names and it produces some nice ones. Ten random results:
Medubicus
Tras
Galvus
Vita
Salvisius
Dexius
Galennius
Agrippus
Trabiton
Sabelis
Then I borrowed your idea of filtering the results by include/exclude lists. My list of Roman names looked like mostly male names, but I found that I could get female names out of it by filtering for the presences of "na#" or "ia#" where "#" is the character I use internally to represent the beginnings and endings of the names.
Asprenna
Lupina
Senna
Caecenna
Verna
Tertia
Arcia
Caratia
Fastia
Novatia
My code: https://github.com/joeclark77net/jc77rogue/blob/master/program/namegen.py
-
I've just implemented the algorithm by JLund3 (http://roguebasin.roguelikedevelopment.org/index.php?title=Names_from_a_high_order_Markov_Process_and_a_simplified_Katz_back-off_scheme) from the RogueBasin wiki, using a "higher order
markov process and a simplified Katz back-off scheme". It lets you fine tune the randomness pretty well and is supposedly better when you have a very small sample of data.
Looks great. I'm glad somebody got some use out of that code!
-jlund3
-
I've just implemented the algorithm by JLund3 (http://roguebasin.roguelikedevelopment.org/index.php?title=Names_from_a_high_order_Markov_Process_and_a_simplified_Katz_back-off_scheme) from the RogueBasin wiki, using a "higher order
markov process and a simplified Katz back-off scheme". It lets you fine tune the randomness pretty well and is supposedly better when you have a very small sample of data.
Looks great. I'm glad somebody got some use out of that code!
-jlund3
I actually wrote my own code (despite it being the same programming language). I was planning to implement the other stuff you describe there -- i.e. automating the model evaluation -- because I'm professionally interested in machine learning. But then I got tired and decided to stop at just replicating what you did.