Boards to discuss Hârn, HârnWorld, HârnMaster, and RPGs in general.
Links - Home - Kelestia Productions - Columbia Games Inc
It is currently Mon May 20, 2013 11:31 pm

All times are UTC + 10 hours [ DST ]




Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Family tree generator
PostPosted: Fri May 26, 2006 4:42 am 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
So I've coded up a family tree generator based on Jonathan Nicholas's excellent article on the topic. Currently it does one of two things - start with an ancestral female born in a specific year and randomly generate descendants for a specified period of time, or generate a randomly aged male and create a family for that person, i.e. spouse and children if he's old enough to have those.

The next tweak I'm interested in applying is to have interrelated clans. Here's my proposed approach - comments are more than welcome.

1. The user specifies a list of clan names to generate, a time period (start and end dates) to run the algorithm, and the proportion of marriages that will be generated within the specified clan list.

2. The program generates an ancestor for each clan - a male of randomly generated current age (but constrained to be old enough to breed), and a spouse of an appropriate relative age.

3. Calculate the "age of first birth" for each female out there.

4. Start moving the simulation forward in time, creating new people at the appropriate time in the mother's life. For one gender or another (let's say male for this example), when they reach marriage age, roll to see if the marriage is within the clan list or with an "outsider". If within the clan list, calculate the relative age of their wife, and now search for a female at or near the appropriate age and marry them - if not, create a female with a random clan name and marry them.

5. Proceed for as many years as desired.

So the ultimate goal is that you get a whole set of clans and their intermarriages, suitable for dropping on your campaign setting. I could possibly weight things such that clans who have intermarried in the past are slightly more likely to do so in the future.

As a possible future enhancement, have clans located by region, so that marriage to a clan within your region is more likely than a more distant clan.

Anyway, that's what I'm working on at the moment. If anyone wants to suggest features for this, I'm all ears.

PS does anyone know if Jonathan Nicholas frequents the forum and if so what his username is?

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
PostPosted: Fri May 26, 2006 4:44 am 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Odder wrote:
PS does anyone know if Jonathan Nicholas frequents the forum and if so what his username is?

Hm, I'm guessing it's Nichola.

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
PostPosted: Fri May 26, 2006 6:35 am 
Offline
Knight
Knight
User avatar

Joined: Thu Jun 05, 2003 7:55 am
Posts: 1119
Location: North Jersey, USA
Odder wrote:
So I've coded up a family tree generator based on Jonathan Nicholas' excellent article on the topic. Currently it does one of two things - start with an ancestral female born in a specific year and randomly generate descendants for a specified period of time, or generate a randomly aged male and create a family for that person, i.e. spouse and children if he's old enough to have those.

The next tweak I'm interested in applying is to have interrelated clans. Here's my proposed approach - comments are more than welcome.

1. The user specifies a list of clan names to generate, a time period (start and end dates) to run the algorithm, and the proportion of marriages that will be generated within the specified clan list.

2. The program generates an ancestor for each clan - a male of randomly generated current age (but constrained to be old enough to breed), and a spouse of an appropriate relative age.

3. Calculate the "age of first birth" for each female out there.

4. Start moving the simulation forward in time, creating new people at the appropriate time in the mother's life. For one gender or another (let's say male for this example), when they reach marriage age, roll to see if the marriage is within the clan list or with an "outsider". If within the clan list, calculate the relative age of their wife, and now search for a female at or near the appropriate age and marry them - if not, create a female with a random clan name and marry them.

5. Proceed for as many years as desired.

So the ultimate goal is that you get a whole set of clans and their intermarriages, suitable for dropping on your campaign setting. I could possibly weight things such that clans who have intermarried in the past are slightly more likely to do so in the future.

As a possible future enhancement, have clans located by region, so that marriage to a clan within your region is more likely than a more distant clan.

Anyway, that's what I'm working on at the moment. If anyone wants to suggest features for this, I'm all ears.

PS does anyone know if Jonathan Nicholas frequents the forum and if so what his username is?


That's me.

A few notes concerning how I have been using things.

You should have some utility to 'force' a family member in. Sometimes this will be a specific descendant (e.g. a PC), and sometimes this will be a known family branch (e.g. Clan Caldeth). I suppose this could be done after the program runs...

For nobility intermarriages in Kaldor, I created a male line family tree for every greatclan, ensuring that those names and dates that appear in canon or fanon resources were included.

Then, for each female added to a clan by marriage I looked for a female descendant of another clan with the same birth year. Those two women were then identified as the same woman and her dates of marriage and death then became those generated for her husband's clan.

If multiple choices are available, I matched according to what I thought would make good politics in the marriage year. If no choices are available, then the woman was the member of a lesser or foriegn clan. Conforming to my own bias, I prevented marriages between first cousins. Constraining matches to age within a calendar year seemed to be quite effective at getting the right number of intermarriages.

I think this sounds mostly like what you will be doing. I'll be happy to provide feedback/opinion on specific questions.

_________________
Any sufficiently analyzed magic is indistinguishable from SCIENCE! -- Agatha Heterodyne


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 6:46 am 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Yeah, I was pondering how to incorporate canon data into things while randomly generate the rest. That's definitely an eventual goal - for now I'm going to get it working without regard for canon or other constraints.

Now if I can come up with a "what would make good politics in the marriage year" algorithm this would be pretty slick. What guidelines did you use to determine that?

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
PostPosted: Fri May 26, 2006 6:47 am 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Nichola wrote:
For nobility intermarriages in Kaldor, I created a male line family tree for every greatclan, ensuring that those names and dates that appear in canon or fanon resources were included.

You don't happen to have that information in a neat package, do you?

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
PostPosted: Fri May 26, 2006 7:21 am 
Offline
Knight
Knight
User avatar

Joined: Thu Jun 05, 2003 7:55 am
Posts: 1119
Location: North Jersey, USA
Odder wrote:
Nichola wrote:
For nobility intermarriages in Kaldor, I created a male line family tree for every greatclan, ensuring that those names and dates that appear in canon or fanon resources were included.

You don't happen to have that information in a neat package, do you?


The answer is probably. Which information did you mean, exactly?

_________________
Any sufficiently analyzed magic is indistinguishable from SCIENCE! -- Agatha Heterodyne


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 8:10 pm 
Offline
Beadle
Beadle
User avatar

Joined: Fri Jun 27, 2003 5:06 am
Posts: 241
Location: St. Reatham Hill, London, England (SW2)
Hi Guys,

This sounds like a cool little project. I've been using Nichola's guidelines to generate an Orbaalese great clan’s history - with the additional complication of multiple wives... I've been tracking this on a spreadsheet, but it does get laborious to say the least. Do you think you can add polygamy into your algorithm? I'd also love the ability to tweak the results of each generation as it is generated - plug in pc's and npc's, tweak dates etc...

cheers,

G


Top
 Profile  
 
PostPosted: Fri May 26, 2006 9:06 pm 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Nichola wrote:
The answer is probably. Which information did you mean, exactly?

I meant a consolidated list of the known family relationships in canon for (say) Kaldor. Obviously I could browse the pubs myself, but if you happen to have it all pulled together already, that would save me a step. :)

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 9:07 pm 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Grendel wrote:
Do you think you can add polygamy into your algorithm? I'd also love the ability to tweak the results of each generation as it is generated - plug in pc's and npc's, tweak dates etc...

Polygamy wouldn't be too hard, except that it would make the generating the graphical view of the family tree more complicated. I'll definitely consider it for an enhancement.

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
PostPosted: Fri May 26, 2006 11:35 pm 
Offline
Knight
Knight
User avatar

Joined: Thu Jun 05, 2003 7:55 am
Posts: 1119
Location: North Jersey, USA
Odder wrote:
Nichola wrote:
The answer is probably. Which information did you mean, exactly?

I meant a consolidated list of the known family relationships in canon for (say) Kaldor. Obviously I could browse the pubs myself, but if you happen to have it all pulled together already, that would save me a step. :)


I have it in a spreadsheet. Just the greatclans mind you, I don't have time for temporary interlopers (Merchants, Constables, Sheriffs, Harabors). PM me an email address to send it to.

As a potentially relevant aside, I have done a family tree for every Kaldor greatclan from ~600 to 720. I plan to release it as shortly after CGI releases Gardiren. This is mostly because I expect there will be 'new' information in Gardiren that needs to be reconciled with what I have now.

_________________
Any sufficiently analyzed magic is indistinguishable from SCIENCE! -- Agatha Heterodyne


Top
 Profile  
 
PostPosted: Fri May 26, 2006 11:46 pm 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Nichola wrote:
I have it in a spreadsheet. Just the greatclans mind you, I don't have time for temporary interlopers (Merchants, Constables, Sheriffs, Harabors). PM me an email address to send it to.

Will do.

How do you define a greatclan? Hopefully this tool can be useful for filling in the gaps and figuring out relations among the petty little lordlings...

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
PostPosted: Mon May 29, 2006 5:12 pm 
Offline
Knight
Knight
User avatar

Joined: Thu Jun 05, 2003 7:55 am
Posts: 1119
Location: North Jersey, USA
Odder wrote:
How do you define a greatclan? Hopefully this tool can be useful for filling in the gaps and figuring out relations among the petty little lordlings...


They have a heraldry entry in CGI's publication "Kaldor".

_________________
Any sufficiently analyzed magic is indistinguishable from SCIENCE! -- Agatha Heterodyne


Top
 Profile  
 
PostPosted: Mon May 29, 2006 11:14 pm 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Nichola wrote:
Odder wrote:
How do you define a greatclan? Hopefully this tool can be useful for filling in the gaps and figuring out relations among the petty little lordlings...


They have a heraldry entry in CGI's publication "Kaldor".

Ah, the great greatclans. :)

The current status is that I've implemented the algorithm described above, I had to tweak when I discovered that women were frequently being married to men who died in childbirth :-/. I've written code to detect the degree of consanguinity but haven't figured out how to apply it yet. What does canon say about customs/laws/religious practices regarding kissin' cousins?

My inclination is to just use consanguinity as a filter rather than a bias - I'll select the males within an appropriate age range for marrying the girl in question, then I'll remove all of those within a certain distance on the family tree. If that eliminates all the candidates of the appropriate age range, I can either have the girl bear her kid out of wedlock, create a guy from some minor clan to marry, or find an older available man for her - possibly a widower once I tweak things such that folks can remarry.

This approach generates gigantic family trees - currently the graphical tree view does no 'pruning' at all, rather it just displays each and every descendant of the 'root' ancestor. For example, here's what I get with a generation period of 600-720 TR and four 'seed' clans (Montague, Capulet, Lancaster, Plantagenet). Any other clans generated were 'minor' clans added when no other mate could be found:

Image

(The [xxx] numbers are database indexes for debug purposes, please ignore ;) )

Something else I need to figure out how to deal with is the fact that accidents of breeding can result in clans dying off. This might mean that I should be working from present back to past, but that's more complicated. Sigh - I wanted to do this project from when I first read the article, but the complexities like this put me off... :P

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
PostPosted: Tue May 30, 2006 11:36 pm 
Offline
Knight
Knight
User avatar

Joined: Thu Jun 05, 2003 7:55 am
Posts: 1119
Location: North Jersey, USA
Odder wrote:
What does canon say about customs/laws/religious practices regarding kissin' cousins?


I haven't read anything, but in most human societies this is taboo. The genetic problems that can arise are pretty ugly. I have only been applying to first cousins due to the work involved in tracing back further. As a side note, very few societies have rules beyond second cousins - less than one eighth common ancestry just isn't enough to worry about and besides, people forget who their great grandparents were.

Odder wrote:
This approach generates gigantic family trees - currently the graphical tree view does no 'pruning' at all, rather it just displays each and every descendant of the 'root' ancestor.


I'd add a check that says if they die in childhood before year [X], prune them.

Odder wrote:
Something else I need to figure out how to deal with is the fact that accidents of breeding can result in clans dying off. This might mean that I should be working from present back to past, but that's more complicated.


Add a check in each generation such that if no viable offspring result (e.g. living to 25), then redo that generation.

Actually, from my point of view, you have already done the hard part, which is creating the database, and turning the database into a nice display. I would be greatly interested in a feature that allows you to input a family tree and the tool just generates the tree output. 8)

As to the rest, I have a fair amount of practice and methodology built up, both for my own use and just plain 'playtesting' the article. I can write pseudo code instructions for all of this if you want. It will just take some time, which is why I have been suggesting you ask questions where you are stuck. Let me know how you would like to proceed.

_________________
Any sufficiently analyzed magic is indistinguishable from SCIENCE! -- Agatha Heterodyne


Top
 Profile  
 
PostPosted: Tue May 30, 2006 11:53 pm 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Nichola wrote:
Odder wrote:
What does canon say about customs/laws/religious practices regarding kissin' cousins?


I haven't read anything, but in most human societies this is taboo. The genetic problems that can arise are pretty ugly.

And yet the higher social classes of Europe did it pretty often. Sometimes politics trumps both genetics and the 'ew' factor.

Nichola wrote:
I'd add a check that says if they die in childhood before year [X], prune them.

For sure. I envision a few views - a 'person-centric' view that shows the heritage and nearby family of a particular person, and as the tree gets farther away from their line of descent it gets pruned, and a 'clan-centric' view that shows the members of a clan and their descendants, but as daughters marry out of the clan their offspring are not shown (past one generation, perhaps?)

Nichola wrote:
Odder wrote:
Something else I need to figure out how to deal with is the fact that accidents of breeding can result in clans dying off. This might mean that I should be working from present back to past, but that's more complicated.


Add a check in each generation such that if no viable offspring result (e.g. living to 25), then redo that generation.

Yah, that would work. The problem is the current approach operates year by year instead of generation by generation. Maybe I just need to add a check when I generate the wife of a male of the clan line (which is when her lifespan / period of fertility / etc gets generated), first to see if she's the last chance for the clan to survive, and if so ensure that she is fertile, lives to breed, and bump her husband's lifespan so that he can father some kids (if necessary). This, as with all the other tweaks, will slow things down, but it's still way faster than doing it by hand. :)

Nichola wrote:
Actually, from my point of view, you have already done the hard part, which is creating the database, and turning the database into a nice display. I would be greatly interested in a feature that allows you to input a family tree and the tool just generates the tree output. 8)

I definitely see the need for a feature for inputting family trees, especially if we're going to make it so that we can "build out" generated trees from the known canon ones. Let me figure out a format for bulk input of the trees (probably some form of XML) and then we can set volunteers to doing the data entry. 8)

[quote='Nichola']As to the rest, I have a fair amount of practice and methodology built up, both for my own use and just plain 'playtesting' the article. I can write pseudo code instructions for all of this if you want. It will just take some time, which is why I have been suggesting you ask questions where you are stuck. Let me know how you would like to proceed.[/quote]At this point the tools going to go on the back burner (boy, I have a lot of back burners :P) for a little while as I gear up for the first game of my new campaign next weekend.

The next steps I have in mind are to put this up on a website where people can go create their own private worlds of family trees - right now there's only one set of families in the database, so I need to create 'worlds' so that people can work on their own projects without interfering with each other. That's not a difficult task.

After that, a way to 'tweak' existing trees would be good - changing names and relevant dates, adding and removing children, etc. Not sure if that feature will come before or after the bulk import feature. Hmm, perhaps if I also do a bulk export into XML feature, then the tweaking can just be done by modifying the XML file and then reimporting it. Hmm hmm.

Anyhow, stay tuned - I will definitely post more questions here as I run into them.

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 2:52 am 
Offline
Knight
Knight

Joined: Fri Nov 14, 2003 7:16 am
Posts: 1243
Location: Oulu, North Finland, the home of polar bears
How is this project coming along? I'll be needing a program like this very soon so finish it up! I want it yesterday! I'll give you leave to eat and sleep occasionally if you must though...

_________________
Poorly paid academic. Will do research for food.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 3:28 am 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Unfortunately, it's fallen off the radar lately. At the moment it only runs as a standalone app, in the sense that the database only knows about one "world", so to speak. It needs to be enhanced with user accounts, and allow users to create worlds that the families belong to. It's not a ton of work, but unfortuantely there's a fair pile of stuff going on in my work and home life, and the top priority for my gaming cycles is going to be preparing for a HarnCon session.

For the technically inclined, I can hand off a standalone tool which would run on a system with apache, php, and mysql installed. If that requirement isn't too onerous, let me know and I'll write a quick install guide and package it for delivery. If nobody wants to use the standalone tool, I will try to get it web-ified, probably by the end of September or so.

Sorry for the delays...

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 10:22 am 
J-MK wrote:
I'll be needing a program like this very soon so finish it up! I want it yesterday!


Just use this one and tweak it to Harn. That's what I did and it rocks! :D
http://www.jdrpg.com/pendragon/family/family.cgi


Top
  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 5:08 pm 
Offline
Knight
Knight
User avatar

Joined: Thu Feb 21, 2002 6:04 pm
Posts: 1804
Location: Münster, Germany, European Union
AgrikanFury wrote:
Just use this one and tweak it to Harn. That's what I did and it rocks! :D
http://www.jdrpg.com/pendragon/family/family.cgi

Awesome link! :D

_________________
Með kveðju, Thorvald
http://www.last.fm/user/hrafnsbjarg


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 6:36 pm 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Apr 27, 2002 4:02 am
Posts: 816
Location: Münster, Germany, Europe - 51° 58′ N, 7° 38′ E
hrafn wrote:
AgrikanFury wrote:
Just use this one and tweak it to Harn. That's what I did and it rocks! :D
http://www.jdrpg.com/pendragon/family/family.cgi
Awesome link! :D
Indeed! 8)

_________________
Michael - visit Tales of Chybisa.com.

Strange women lying in ponds distributing swords is no basis for a system of government.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 05, 2006 12:25 am 
Offline
Knight
Knight

Joined: Fri Nov 14, 2003 7:16 am
Posts: 1243
Location: Oulu, North Finland, the home of polar bears
I won't be needing it for Harn but for my own world.
Than you kindly for the link anyways. Just what I needed! 8)

_________________
Poorly paid academic. Will do research for food.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 05, 2006 12:55 am 
Isn't it awesome? Originally for Pendragon, so it generates appropriate Saxon and Roman names, etc.


Top
  
 
 Post subject:
PostPosted: Sat Aug 05, 2006 2:09 am 
Offline
Baron
Baron
User avatar

Joined: Sat Jun 22, 2002 2:09 am
Posts: 4320
Location: Boston, MA
Quite a useful link - I've been doing it by hand in a genealogy program, but this could save me some steps. 8)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 05, 2006 2:58 am 
Offline
Knight
Knight
User avatar

Joined: Thu Feb 21, 2002 12:12 am
Posts: 1357
Location: Virginia USA
Yeah, but this thing is ugly. I want the program to make me say WOW not meh... The interface is clunky and unattractive and the output! If you try to do more than 2 generations, it's all jumbled up and hard to read. I want this stuff presented graphically in a nice family tree. I don't have time to sift through all that data and format it myself. What about triplets or more? Multiple marriages? And the key wrong as well. It shows male and female symbols and then doesn't use them. Not something I'd pay for. :wink:


...if the creator of this program should read this and not understand the history of AF's software reviews, I feel compelled to explain that I don't actually feel this way about the software. It's a useful addition and I appreciate it being there. :)

Cheers,

Ken

_________________
Ken Snellings
CHMP Member
Fredericksburg, Virginia, United States of America


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 05, 2006 3:23 am 
Offline
Bailiff
Bailiff
User avatar

Joined: Sat Jan 31, 2004 8:53 am
Posts: 837
Location: La Repulica Popular de Takoma Park
Ken, that's useful feedback that I'll include when I resume development on the tool. One feature I do like is that it will build a graphical family tree from a given root ancestor, but it doesn't have the sense to prune off distant links.

Eventually I want to change the graphics engine so that you specify an ancestor and a decendant, and the tree will cover the line between the two, showing siblings and cousins of the intermediate steps, but not every single person in the tree.

Certainly presenting it in list form like AF's link does is easier from a programming point of view. :)

_________________
I'm your only friend, I'm not your only friend, but I'm a little glowing friend, but really I'm not actually your friend, but I am.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2  Next

All times are UTC + 10 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group