Author Topic: Name Generator  (Read 11066 times)

sokol815

  • Rogueliker
  • ***
  • Posts: 85
  • Karma: +0/-0
  • Web Developer by Day, still Web Developer by night
    • View Profile
    • Email
Name Generator
« 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

Happy hunting! Let me know what you think about it.

guest509

  • Guest
Re: Name Generator
« Reply #1 on: March 08, 2013, 04:50:00 AM »
  That's neat. Thanks.

sokol815

  • Rogueliker
  • ***
  • Posts: 85
  • Karma: +0/-0
  • Web Developer by Day, still Web Developer by night
    • View Profile
    • Email
Re: Name Generator
« Reply #2 on: March 08, 2013, 04:34:42 PM »
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?

joeclark77

  • Rogueliker
  • ***
  • Posts: 90
  • Karma: +0/-0
    • View Profile
Re: Name Generator
« Reply #3 on: March 08, 2013, 07:47:35 PM »
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 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

jlund3

  • Newcomer
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Name Generator
« Reply #4 on: March 08, 2013, 08:28:35 PM »
I've just implemented the algorithm by JLund3 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

joeclark77

  • Rogueliker
  • ***
  • Posts: 90
  • Karma: +0/-0
    • View Profile
Re: Name Generator
« Reply #5 on: March 08, 2013, 08:39:06 PM »
I've just implemented the algorithm by JLund3 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.