AI Rework – Stupid is Smart

Moving on!

One of the more interesting aspects of revising the AI has been learning that my prior tweaks to keep Primum specium from going extinct despite its stupidity had formed a strange mutual reliance between stupidity and survival.

That’s right. Making P. specium smarter is actually making them worse at survival, at least in some very specific areas. So I guess Dumb Will Triumph Because Smart Is

Um… wait, can I start over?

This is most noticable than in how the new, supposedly intelligent P. specium treats dense ‘fields’ of food, like grass tufts.

Previously, a single blind herbivore would move from tuft to tuft. This was a very simple mechanic: they’d start moving, bump into a tuft, and start eating it. This made them fairly efficient grazers: though they’d occasionally miss thanks to blindness, in a dense field of grass they would usually find a fairly close tuft to eat.

Now they’re smarter. The calculate how much energy they’ll get from all the food sources in their vicinity, subtract the cost of walking to each, and select the best option. This usually means a corpse or plant with high energy. Grass tufts are inefficient and don’t have much energy, so even if they’re close, they’re rarely targeted.

The end result? Creatures deciding that the dozen low-energy grasses next to them are worthless and walking miles for a single high-energy corpse. This is a very poor survival decision, especially when 30 other creatures are also going for the high energy source, and are already closer to it.

Though it does make for some pretty patterns in the swarms of creatures…

They're eating that plant! And then they're going to eat me! Oh nooooooo!

They’re eating that plant! And then they’re going to eat me! Oh nooooooo!

I think I’ve invented a whole new level of stupid. Where before they made stupid decisions simply because they didn’t think, now they make stupid decisions because they think too much.

So the question is… do we make the creatures even *more* intelligent, having them think ahead to the next food source, and the food source after that (a recursive, branching algorithm that sounds like a CPU nightmare) or do we simply tell them to overcompensate for distance to force them to target closer objects?

Both solutions sound like they would work, but neither is particularly attractive: the first for CPU reasons, the second because this update is supposed to be about *intelligence*, not cheap tricks to make them act stupider.

So, can we take a third option here? A food sources attractiveness doesn’t have to be a simple measure of the energy it contains: it could also factor in the number of similar objects in it’s area, and even the number of creatures targeting it.

These are imperfect proxies, but that’s actually a really good way to think of them. Proxies, imperfect representations of reality, are a far better analog for a biological thought process than rationally pre-calculating the consequences of an action. The creature’s aren’t robots (which is a really weird thing to say in this context), and they aren’t perfect. We’re not trying to stop them from making stupid decisions, just make them less blatent.

Of course, “blatancy” is open to debate. For example, for the child individually, killing and eating it’s parent is actually a very logical decision: the parent is likely to have quite a bit of energy and be weakened from pregnancy, and eating it vastly improves the child’s chance of reproduction. The obvious problem with this Randian survival strategy is that while it might be logical for the individual, it is terrible behavior for the species as a whole.

The initial and obvious proxies were energy content, walk cost, battle cost, efficiency and diet. I’ve since implemented a ‘food density’ proxy that allows them to prioritise denser area’s of grass, and a ‘competition’ proxy that reduces the attractiveness of food that is already being approached or eaten by other creatures. I’m also looking into an ’empathy’ proxy, based on genetic distance, to reduce the amount of familial murder and cannibalism. Plus I’m screwing about with the way the thought bubbles work. I just can’t leave well enough alone, can I?

Oh well, it’s all good. I may not succeed in making them smarter, but if nothing else, their stupidity should be more complex and entertaining from here on out.



  1. #1 by White parrot on January 11, 2015 - 9:50 pm

    Sorry for not being more present, quite busy ; so I’m just going through quickly.

    Natural_20 said : “Alright, so creatures can account for the amount of work involved in obtaining food. Good.” ; how about a laziness proxy then ?
    Like a genetic variable that makes creatures go “screw it, I’m finding something else” when too much efforts seem to be required (independently of the goal), counterbalancing the actual benefit they’d gain for following through the plan ?
    Such laziness would encourage lazy creatures to go for “safe” but unrewarding plans, leaving more motivated creatures to fight for bigger rewards.

    Just a thought ; of course other proxies are necessary.

  2. #2 by Worthstream on January 12, 2015 - 7:30 pm

    “do we simply tell them to overcompensate for distance to force them to target closer objects?”

    This would be a good approximation of what we actually do in real life. When a reward is far in the future our brain applies an “”hyperbolic discounting” to its value. The farther it is in the future the less rewrding it feels.

    Think about it: would you prefer a delicious dessert now, or two of them in a week? Withouthyperbolic discounting a perfectly rational creature would choose the latter while in real life almost eveyone will chose the former.

    It also makes sense from a evolutionary biology point of view: the more uncertain is a reward the more you risk by trying to achieve it. Creatures who accept too much risk in their lives are less likely to survive and reproduce.

  3. #3 by ququasar on January 13, 2015 - 12:32 pm

    “how about a laziness proxy then ?
    Like a genetic variable that makes creatures go “screw it, I’m finding something else” when too much efforts seem to be required (independently of the goal), counterbalancing the actual benefit they’d gain for following through the plan ?”

    That’s actually a really good idea. I’ve been messing with weighting various elements, but I never considered an overall cost-to-benefit weight. That would work really well, and it’s nicely intuitive to boot: you’d expect P. Specium to be a lazy organism where you wouldn’t expect it to have a highly developed sense of empathy or disgust.

    I can pretty much just insert that idea as-is. About the only change I’ll need to make is the terminology, since I’ll also need to use a synonym for laziness to refer to how often they sleep… I’m thinking if we invert it, “motivation” might be a good term for how much effort they’re willing to go to for a high-energy food source.

  4. #4 by Ekolu on January 14, 2015 - 9:16 am

    I totally agree with what you’re saying.
    Sure, when I think of what I want to eat at any given meal; the calorie intake, the cost in terms of distance or gas and the food itself, and even the environmental impact (Like the amount of plastics the food is wrapped in) will all come into account, but it is much more likely that my habits in diet will be the deciding factor, if not the only factor. I could eat a head of lettuce instead of a can of spam, but being that my diet is above 0.0, and I am disgusting, I choose the spam. I’d like it for diet to be a larger part, if not the largest, in what is going on within P. Speciums decision making process.

    I’m not lost, though, and I realize that the issue is when the blank slate has no dietary preference and how it decides whether to scavenge or graze/browse. I think a lot of your work would be redundant if the animals had vision. If you ever plan to implement vision, you’d have to butcher up the code you’re currently working on to save our CPUs, so that we don’t have creatures making judgments on things it cant even see, like another creature on the other side of a hill.

    I would rather the creature walk around blindly than to have him telepathically aware of everything. That sounds like a horror story for processors.

    I WOULD, on the other hand, further suggest that one of the factors to cause a creature to “wander” would be population density. If “it” see’s enough creatures in an area it feels compelled to “search”/”wander” for unoccupied fields, which could be governed by a threshold based off of the curiosity stat, the empathy proxy, or even its aggressiveness.

    I love this blog and I love you all. I feel like a new age turtle come out of my shell.

  5. #5 by Ekolu on January 14, 2015 - 9:25 am

    I also wanted to suggest some kind of territory marking. I don’t want to suggest another stat like “territorial” but I would like for some creatures to follow its own patterns…like how rats, dogs, and cats are guided, to differing extents, by their own scents, Sounds like a horror story for RAM as I think about it now, but it would give our speciums much more organic looking “habits” or “behaviors”

  6. #6 by CatFish21sm on January 27, 2015 - 12:34 pm

    Hey is it too late to comment? another idea to help solve you’re problem could be a brain :p simple enough. What I mean is some creatures thrive without a brain they don’t need one in fact a brain would hinder them (earth worms jelly fish so on) so why not make their intelligence an evolutionary factor if too much intelligence at an early stage is bad thats not exactly an unnatural occurrence and it adds to the complexity of the game without having to do all of these work arounds. That way if stupid is good let them be stupid and when smart is better they will evolve intelligence :p

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: