Markovchain???

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Tet
Posts: 391
Joined: February 18th, 2009, 5:11 am

Re: Markovchain???

Post by Tet »

Hi Turuk. Sorry about my harsh word "crap"

I mean names containing triple and more letters. Like Kevvvvvvin.
Being realy short like Ke.
And being far to long like Mikikekekikveve.

These could be filtered by easy logic. These logic I would like as WML command.
My Temple Project: http://forums.wesnoth.org/viewtopic.php?f=23&t=29800
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895

User avatar
ancestral
Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: Markovchain???

Post by ancestral »

Unfortunately, you need a corpus of words for this to work properly.
Perhaps you should look at the US census for names to use:

http://www.census.gov/genealogy/names/names_files.html

And check out:

http://www.fourteenminutes.com/fun/names/


If it still does not seem that realistic keep in mind Markov chains can be far from perfect. Maybe you seek a different way to generate names. Maybe you just want a file with a list of names you've already thought up. Dunno.

Take in point something I came up with to generate pseudo-Japanese names. (The program takes one argument, a number, indicating the number of names you'd like it to generate, or will automatically generate 40 words.)

If anyone finds value in this, feel free to use and abuse it as you like under Creative Commons Attribution License 3.0.

(Edit: It's rough and I'm sure could use refinement. The first set of @letters gets overwritten; the idea originally was I could test either by commenting them out. Feel free to experiment if you're curious, though the latter, which is default, is a little more robust.)
Attachments
names.pl.zip
A Perl name generation file given as an example that makes a modest attempt at emulating Japanese language. CC-by-3.0.
(1.29 KiB) Downloaded 83 times
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer

Tet
Posts: 391
Joined: February 18th, 2009, 5:11 am

Re: Markovchain???

Post by Tet »

I like the idea of including different name generators in the system. The one which was working with predefined syllabus was great. You take names and define the sylabus by hand. The Computer mixes start, middle and ending sylabus automatically. very simple. very good results.

Lets say: Mi-kus, Ke-vin and To-ma-so

It should generate Mivin, Miso, Kekus,Keso,Tokus,Tovin,Toso AND in 1 out of 3 fill in -ma- in the middle like Mimakus, Kemavin,Mimavin,Mimaso,Kemakus,Kemaso,Tomakus,Tomavin.

All usefull names in a fantasy game with 3 starting names.
My Temple Project: http://forums.wesnoth.org/viewtopic.php?f=23&t=29800
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895

X-Site
Posts: 31
Joined: July 27th, 2007, 6:12 pm

Re: Markovchain???

Post by X-Site »

I agree I worked with a generator like this in a warcraft mod. it can produce quite an good amount of names from a fair amount of syllables. By having different containers for different syllables you can also create names that have gradually 3 or more letters in one.
Al-fred, Fa-bi-an, Ni-na, Ro-bert, Hum-ber-to, Ma-xi-mus
container1= "Al Fa Ni Ro" (beginning, 2 letters)
container2= "bi xi" (mid, 2 letters)
container2= "bi xi" (end, 2 letters female)
container3= "ber"... (mid, 3 letters)
etc.

Albi
Niberna
Roxi

The names will be fantasy like, also esyer to remember and more interesting. You could separate male/female names, for me however it worked fine just defining different endings.
A container system makes up impressive names when used wisely.

User avatar
TeaIntoxicated
Posts: 7
Joined: July 10th, 2019, 11:31 pm
Location: III Rzeczpospolita

Re: Markovchain???

Post by TeaIntoxicated »

If any inexprienced modder, like me, wonders how to disable the markov chain to leave real names for historical factions (for example USSR with its Ivans, Vladimirs and Nikitas) unchanged from the list - set markov_chain_size to a high value that exceeds the count of letters in the names.

Wussel
Posts: 617
Joined: July 28th, 2012, 5:58 am

Re: Markovchain???

Post by Wussel »

Wow, more than 10 years between posts!

We really need that so called container system. I have read about this in not quit so old posts too.

Is this ready as a macro anywhere? Is there a simple solution to make sure names are picked from a list without change? Can first and second names be used within a name generator? Maybe even a prefix to the last name?

This should be really easy for a professional programmer. Why does it take more than a decade to implement?

Post Reply