Dating Sim Math
I was thinking about making a dating sim game but ran into a problem as I was writing out what I wanted my game to do.Ok so you know in your typical dating sim you have several characteristics that make up your character(s).Examples would be like Strength, Charisma, Reputation but until this moment I never really thought about how such stats affect game play.How are these stats used in a dating sim game?What does some of the math look like so I know how to program it into my game? If it is too elementary a question I am sorry but I honestly have no idea.
I'd imagine that each player has,
1.) various characteristics
2.) his/her own weights associated to those characteristics, that are used to evaluate others.
To use your example characteristics, suppose dude X has particular values for
1.) Strength
2.) Charisma
3.) Reputation.
Now say girl Y wants to evaluate how much she likes dude X. She'd add up,
girlY.strengthWeight * dudeX.strength + girlY.charismaWeight * dudeX.charisma + girlY.reputationWeight * dudeX.reputation.
This would be her overall attraction to dudeX. And if there are some characteristics that girlY perceives negatively, she'd have negative weights associated with them. Where do these weights and characteristics come from? They'd be drawn randomly from some probability distribution.
Calling the dude's characteristic vector 'x' and the girl's weight vector 'w', this is just the inner (a.k.a. "dot") product, w[sup]T[/sup] x. It is a linear function of x.
If you want to be able to also capture more sophisticated preferences (i.e., "I'm attracted to people who are about the right height, but neither too tall nor too short") you could also use quadratic functions; these take the form
x[sup]T[/sup] W x + w[sup]T[/sup] x
for some symmetric matrix W and vector w.
If you want to get fancy, you could have a "measurement model" for people's characteristics. I.e., immediately, girlY doesn't know exactly how strong/charismatic/reputable guyX is; she merely has an idea about what this is. As you go on more dates, you can correct her perception of guyX -- or, if the data she gets happen to be very noisy, maybe even give her an increasingly incorrect idea. One way to do this would be to give her lots of measurements of guyX's characteristics to which you've added noise; then, her estimate would be the average of all her measurements so far (note that you don't actually need to keep track of all the measurements, but only the current average and the number of samples).
At this point I'm just making stuff up, but you get the idea.
You might also want to factor in some time dynamics... i.e., you tend to like someone more the longer you've known them (you rarely have much emotional attachment to people you don't know, even if you think they're hot and have awesome bowhunting skills), but on the flip side, time can also take the spark out of romance and you can get bored. Again, some people could be more novelty-seeking -- they could form attachments quickly and get bored very quickly -- and others could be more cautious and/or shy; i.e., they'd form attachments slowly and tend not to get bored. There are various ways to handle this, but whatever you make up will be more-or-less as valid as anything else.
1.) various characteristics
2.) his/her own weights associated to those characteristics, that are used to evaluate others.
To use your example characteristics, suppose dude X has particular values for
1.) Strength
2.) Charisma
3.) Reputation.
Now say girl Y wants to evaluate how much she likes dude X. She'd add up,
girlY.strengthWeight * dudeX.strength + girlY.charismaWeight * dudeX.charisma + girlY.reputationWeight * dudeX.reputation.
This would be her overall attraction to dudeX. And if there are some characteristics that girlY perceives negatively, she'd have negative weights associated with them. Where do these weights and characteristics come from? They'd be drawn randomly from some probability distribution.
Calling the dude's characteristic vector 'x' and the girl's weight vector 'w', this is just the inner (a.k.a. "dot") product, w[sup]T[/sup] x. It is a linear function of x.
If you want to be able to also capture more sophisticated preferences (i.e., "I'm attracted to people who are about the right height, but neither too tall nor too short") you could also use quadratic functions; these take the form
x[sup]T[/sup] W x + w[sup]T[/sup] x
for some symmetric matrix W and vector w.
If you want to get fancy, you could have a "measurement model" for people's characteristics. I.e., immediately, girlY doesn't know exactly how strong/charismatic/reputable guyX is; she merely has an idea about what this is. As you go on more dates, you can correct her perception of guyX -- or, if the data she gets happen to be very noisy, maybe even give her an increasingly incorrect idea. One way to do this would be to give her lots of measurements of guyX's characteristics to which you've added noise; then, her estimate would be the average of all her measurements so far (note that you don't actually need to keep track of all the measurements, but only the current average and the number of samples).
At this point I'm just making stuff up, but you get the idea.
You might also want to factor in some time dynamics... i.e., you tend to like someone more the longer you've known them (you rarely have much emotional attachment to people you don't know, even if you think they're hot and have awesome bowhunting skills), but on the flip side, time can also take the spark out of romance and you can get bored. Again, some people could be more novelty-seeking -- they could form attachments quickly and get bored very quickly -- and others could be more cautious and/or shy; i.e., they'd form attachments slowly and tend not to get bored. There are various ways to handle this, but whatever you make up will be more-or-less as valid as anything else.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement