Sunday, June 5, 2016

Day ?: Herding

The old way: random mixing.

Instead of sending the two morgs off in opposite directions after every meeting, now they will "lean in" to a favorable encounter. If a bad guy takes advantage of a sucker, he will chase after (but the sucker will also run away, because from his point-of-view the encounter was unfavorable). If two bad guys meet, they will repel each other, ideally maximizing the time before they run into each other again. And if two nice guys meet they will try to travel together, increasing their chances of interacting further. This gives rise to some interesting "herding" behavior, as temporary clusters of co-operative morgs form and dissipate.

The new way: co-operative clustering.

Friday, April 8, 2016

Day 20: GUI Updates


This is what the sim looks like now. There are some new graphs and spiffy readouts to keep track of what's going on globally and per-morg.
  • The space to the right of the playfield is for keeping track of a selected (yellow dotted halo) individual over his lifetime, with separate "thought bubbles" for major life events (like having a child, dying), and encounters with others.
  • Stuck the speed slider over there now. <===
  • The newest addition: the leaderboard, to the bottom of the playfield. It's a bar graph which displays the total health of all individuals type-by-type. So you can easily see which type is currently winning... and cheer them on!

Friday, April 1, 2016

Day 16: Memories

Morgs now can remember how an individual played last time they met... and adjust their current play accordingly. Oh ho!  (more on this soon...)

Friday, March 25, 2016

Day 12 or so: Rewards and Punishments

Instead of simply losing 10 life for interacting, which is where I left things at Christmas, we want to reward or punish the morg for interacting smartly or not. To simplify things, let's imagine a world of only two morg types. "NiceGuy" and "Douche". Niceguy (N) always plays true, no matter what. And Douche (D) always plays false. Now, when N meets D, N naively plays nice and D callously takes advantage of him. N loses some points for helping D without being helped in return, and D gains a lot of points for reaping the benefits of N's help without giving in return. N has earned the sucker's penalty and D has earned the big tempting prize. Let's say -5 points and +10 points, respectively. After many such meetings, NiceGuy will be hurting and Douche will be doing fantastic.

But we didn't discuss what happens when N meets another N. They both help each other, earning the co-op reward. The reward is not as big as the tempting prize because they each spent some energy on helping the other. They got their backs scratched, but they had to scratch a back in order to get it. Let's say they get +6 points each.

When D meets D, no backs are scratched, so they get 0 points. Or maybe there's some small risk of going without a scratched back... you might have a tick that you can't get at without a friend's help, for example. -0.5.

In a simple world like this, the Ds will always win. They will never co-operate, but there are enough suckers around to take advantage of that they won't go unhelped. Unfortunately, their luck only lasts as long as there are suckers to take advantage of. The Triumph of the Douche is only temporary. Once the NiceGuys quickly go extinct, the Douches will linger slowly as they do each other down over and over for the rest of the game... a bleak outcome.

A Douche (red) plays false until NiceGuy is dead. : (
There are infinite ways to assign values to the various rewards and penalties... As many ways as there are types of real-life social interaction multiplied by their possible outcomes. And the values assigned impact how the game will play out, obviously. If the temptation is too great, then Douches have an advantage. If helping another costs too little, then NiceGuys have an advantage (in that there's no real disadvantage to being a sucker). So I want to find acceptable average values: what you might call "balancing" in the Real-Time Strategy genre.

Here is the way I'm thinking about these values currently: (and some of the code, just to give a little flavor)







Saturday, March 19, 2016

Day 10 or So: Hiatus, Old Age and Birth

[ The project lives again! Long hiatus over the fall and Christmas of last year while I started up the Train Game and y'know... did my day job. Now reviving it because I'm going to SkeptiCamp this summer and I want to make a presentation out of it for my friends. ]

Morgs now age from Infancy, through Fertility, and into Senility; at which point they lose health until they are dead. But that's not necessarily the end. Before they die, morgs now also have the possibility to reproduce (asexually)! If they are of age, healthy enough, and if there is space for their child in the world. By adding more of its own type to the population, the morg can change its own environment and pass down a legacy...

Here is the snip of code that determines whether a morg will give birth in a given year.