The Unique Scent of Prey

Icebound Hole, a Dragon Norn tester with a funny Protective Tub name, has caught a Balloon Pigeon. I've been testing the removal of the old 'hunting' stuff in their genome thanks to my new Prey Scent agent. I forget if his Gen1 ancestors are from the 'before' or 'after' batches, but it looks like he finds 'get critter' to be quite entertaining, so he probably still has the old 'chase' and 'get' instincts active.

Dragons are predators. Well before I began working with their sprites and a similar genetic concept, the original Draconian Norns were set up to seek out bugs and critters for food instead of the normal food, seed, and fruit class objects. I've changed the way my Dragon Norns' digestion and such works - they're a lot more interested in food type objects than the old Draconians were, for example. Also, they can survive entirely on just critters OR bugs, one or the other, and no other edibles, due to both triggering Ate an Animal and my setting up a chemical reaction that lets them get all three types of nourishment from that one stimulus. In a way they are more carnivorous than the originals, having no need to seek out a balanced diet.

However, being carnivores has always meant some sacrifices and constraints. They are not very good navigators compared to normal Norns. Part of this is due to the brain changes in CFF/TWBs, which make their thoughts a little more random and thus more creative/explorative but with less ability to stay focused on a long-term idea such as following a scent to its source. The Hunger Overwhelmsion stuff helps, but not enough. Some people, like Grendel Man, find CFF/TWBs stupider than average; I prefer to see it as a sort of Norn ADD. :p Having ADD myself, I can sympathize! This trait allows them to have more chance to develop personality and not be so overwhelmed by their instincts if their lifespan is long enough. Since dragons are very long-lived, I like these traits in them. But I can see why others would not, especially if working with much shorter lived breeds.

However, with that said, most CFF/TWB Norns with a normal diet will still be able to navigate in my experience, just with less focus compared to a typical base Norn. They can still smell food and still know that they should head toward food when hungry. They just aren't as able to keep focused on that idea when there are distractions around (meaning anything else they could possibly think of to do or try LOL) But they usually don't get hideously lost and starve to death in corners of the ship. It does happen from time to time, but it's not such a problem that I feel like I have to trap them in 'friendlier' metarooms to keep them from getting themselves lost.

Alas, this is not so with my Dragon Norns. I'm not QUITE as strict about that as I used to be, but it is pretty normal for me to essentially set up either one huge metaroom (Biodome or C12DS, say) or else two or three not-so-huge ones (Flooded Norn Terrarium and the Meso, say, or Deep Abyss and Meso plus Norngarden 1), release bugs and critters and place extra toys and otherwise get the places really set up nicely, then place the eggs and let them go. They'll have Offline Portals or something to travel between the rooms. But I'll lock the doors to any official metarooms being used, and sometimes use Door Hiders on both sides, too. That way they have a lot of room to roam and explore but no chance of getting into a place where they can get lost too far from food.

In addition to the CFF/TWB 'randomness factor', I have given my Dragon Norns a general tendency to wander when bored. Essentially, the "I am Travelling" stimulus has a boosted Boredom reduction compared to normal CFF/TWB, and I think I also tacked on a tiny, tiny bit of Reward, too. The result is a much-reduced tendency to clump up in one place. They still tend to do that, but the behavior is much more personality based now. Family/friend groups will tend to form in certain spots, like the C12DS garden area, but some Norns will spend their whole lives in such groups while other individuals will roam far and wide, visiting the groups but then taking off again on their own. I've also noticed a tendency for them to mate off and roam together in male-female pairs. Pair bonding is not something I was trying to create, and they're only slightly more monogamous than other Norns, but it's something I notice fairly commonly.

This wandering tendency means that they're very good at satisfying their needs and taking care of themselves to a certain degree. If bored, they will roam to entertain themselves, and the act of moving will eventually take them to a toy or something they can then play with, or other Norns to interact with. The problem though is that boredom isn't fatal. It's fine for them to wander aimlessly in boredom until they find a better way to relieve it than simple roaming.

However, this doesn't work as well for food. Even in a huge metaroom where the food spreads out a lot, the wandering will -usually- get them close enough to food to see it, and if they see food when hungry they will eat it. They are very good at taking care of themselves so long as the environment is stocked well enough to put food within casual wandering distance at all times. However, if they get out into the corridors of the Shee starship, for example, they can very easily get lost and thus starve to death before the random wandering takes them within sight range of food.

I have also, many times, witnessed flying or swimming Dragons 'pacing' back and forth with fish or birds nearby, but too far above their heads or below their feet for them to see. It was as if they could tell the prey was near, somehow, but couldn't pinpoint their location by sight, and so could not find them.

This was happening because critters and bugs do not have a unique scent in the default game. In fact I suspect most do not have any scent at all. Some critters, such as the Marine Terrarium fish, apparently give off Protein scent by default, and that should have helped, but it didn't, at least not enough to make a difference. Probably because Protein scent is primarily associated with fruit, which is not something the Dragons have any instinct to seek out when hungry. (Some of them learn to enjoy eating fruit regardless, but even they can't scent track it efficiently because the brain tracts related to scent tracking aren't activated by the concept of fruit since I changed the instincts and stimuli to relate to bugs and critters instead.)

Vivisection Identity is about to raid the nest. At least, she thinks she is. As far as I can tell those yellow birds aren't instinct friendly. I know that the Albian Carrot Beetles definitely aren't - they regularly cause major confusion in the poor Norns who like to hang out in the garden. I often have to take them away and put them in some improbable place so they'll stop getting in the way of the Norns' normal feeding. I'll have to fix that sometime. 

Now, when I say 'scent', I'm referring to CAs. CAs are not smells, per se. They are also used to represent such things as light and heat. Their most obvious application in usual gameplay, though, is the smells, since light and heat are invisible and most Norns, Grendels, and Ettins do not react much if at all to light and heat. (TWBs do react to heat, and it's a big deal for them, meaning it matters to Dragon Norns since they're modified TWBs, but I'm not sure it matters much to any other genetic groups - except perhaps the Magma and Fire Norns, who use a different system of heat detection if I understand correctly anyway.)

Normally, a hungry Norn will look around for something it instinctively knows is edible - fruit, food, or seeds. If it doesn't see any such things, its brain automatically checks to see if there are any relevant CA values in the room the Norn is currently in (not metaroom, but the 'rooms' making up the metaroom - you can't see them under normal circumstances but there are ways to make them visible). In a metaroom, each room has various  numbers assigned to it that reflect the presence of different CAs. Objects are set to EMIT (OH LOOK SOME CAOS IN MY BLOG took long enough *ahem*) a set amount of a single scent (it seems like a given thing can only emit one scent at a time, but more than one thing can be assigned to emit a given scent), ranging from .1 to .9 typically. In the room where the agent emitting the CA is emitted, the value for that CA is equal to the value emitted by the agent. In rooms immediately adjacent, the number is divided somehow (I don't know the exact math involved) to lower it a little. The higher the number, the more 'rooms' it takes for the number to drop to zero. In short, the stronger the smell, the farther it carries before it 'dissipates'.

So, if a Norn's brain detects that the CA associated with something it knows is edible (say, Protein CA for fruit) is at a value higher than zero in the current room, it knows that fruit is somewhere nearby. As it moves around it will avoid directions in which the CA number shrinks, and move in directions in which it gets larger. This leads to a very direct and purposeful march toward the location of the fruit (assuming the CA links are set up correctly, but that's a topic for another post).

There's a common procedure people use called an IQ test, but IMO it tests the Norn's scent tracking ability more than intelligence per se. I do not consider my Dragons to be stupid at all - I've seen them do some really interesting and complex learned behaviors. But they fail that IQ test every single time. I mean like, 100%. No exaggeration. It's because they can't scent navigate at all whatsoever in a normal world. This leaves them desperately trying to figure out how to interact with their environment to find food. They try plenty of solutions, in a way I consider quite intelligent. I'd do the same thing if I were trapped in an empty room and slowly starving to death, after all, and I'm a person with an IQ in the 130-150 range. I am not at all stupid. But when you're in a low-resource situation, alone, you have no idea what's going on, and you're panicking, you try everything you can think of even if it seems to make no sense, just in case it might work. And that's exactly what I see my Dragons doing. So they don't seem stupid to me at all. Just stuck in a situation they don't have the resources to deal with.

Of course, it doesn't help that I made their baby stage a lot more realistic. Most Norns die in 30 minutes or so without food. Dragons die in about four minutes. So they have a LOT less time to figure it out. But even if I give them a half hour, most of them won't make it. They'll get stuck trying to figure out how to make the teleporter work, typically. Again, reasonable behavior that makes sense given their genes (they instinctively want to use a teleporter or portal if excessively lonely, crowded, or bored). But not helpful at all in that situation. And nothing about the situation discourages them from trying alternate idea after alternate idea ("OK, the teleporter won't work no matter what I do to it... let's try hitting, eating, pushing, pulling, and staring at the elevator now.") until they starve to death.

Again... reminds me a lot of  having ADD! I'm bad at remembering to eat when I'm stuck on a problem too. :p That's that 'randomness' bit of the CFF/TWB genome at work, that part of it. But if they could scent navigate, they'd have a much better chance of making their way out of the Workshop and into the Meso, following those ever-increasing CA counts.

Recently I hit on the idea of giving bugs and critters their own scent. Unfortunately there was no totally unused scent available; number 9 was given to plants and flowers by the Butterfly Norn agent years ago. And somewhat more recently, 19 was given to toys by the New Toy Smell agent. But I decided that in my world it was more important for them to be able to find food by scent than toys, given what I mentioned earlier about the relative deadliness of boredom versus hunger. They rarely have much trouble entertaining themselves anyway - they love to interact with their environment in whatever way they can. If there are no toys around, they'll stand there gleefully hitting, pushing, and pulling whatever is available. Like, anything.

So I'm not worried about them being excessively bored. I made them prone to high boredom for a reason and I like the way it encourages them to develop their personalities and preferences over time.

But having to essentially baby them by locking them into at least moderately favorable environments annoyed me. I want them to be pretty tough and survivable, but if wandering too far out of range of food is generally deadly, that doesn't really match my design specs. So I began thinking about making an agent using CA 19. I'd have to stop using New Toy Smell, but like I said, as much as I like that agent, I'd rather have prey smell where my dragons are concerned.

So with the help of the awesome people on Creatures Caves' forums, I put together my first working agent! It's very simple, but I'm pretty proud of it. Right now it fires way more often than I intended and I need to fix that, but otherwise it seems to be working exactly as intended. I also had to edit a .cos file to make it work properly, but that wasn't too hard.

Here's how it works. I started with the injection script.

INST to install something new! I think that's what that means, anyway. That's how I read it at least.

Then two global commands. This is what I also put into that .cos file I edited, but I wanted to include them in the agent script too just in case the .cos edit didn't work, and I edited the .cos in case this bit of the agent didn't work. Thoroughly redundant and very amateur-coder-ish, I know, but sometimes anxiety makes me do weird things. Point is, I know at least one worked. XD

Anyway, the globals in question are CACL. This is the bit that makes the Norn brains expect to associate a given CA with a given item class by default. So in this case, it looks like this:

cacl 2 13 0 19
cacl 2 15 0 19

That says to the engine, "All bugs and critters should emit scent 19." In turn, all Norn brains will have that expectation from the moment of birth. Whether it MATTERS to them or not is another question - that's a genetic thing - but this is what allows me to make hunting and feeding-related genes involving CA 19 and expect them to work. Without that brain association, I could have the animal agents emitting lots of CA 19 and I could have given the Norns instincts and stimuli related to CA 19, but without knowing that CA 19 means 'animal', a vital link in the chain is missing. The Norn's brain doesn't associate that CA with anything in particular, so the instincts and stimuli won't work right. I'm not sure exactly what would happen, since I've never put my Norns in that situation, granted - but I'm 99% sure it would result in either a lot of Norn confusion or else there would be no visible effect at all from adding the EMITs and the genes.

ENUM with the agent's classifier, KILL TARG, and NEXT...

Now, the agent itself! NEW:SIMP to create a new simple object, then a classifier in the 1 1 class and that blank sprite. Since this agent's only job is to make bugs and critters smelly, it doesn't need to look like anything or be perceptible to Norns.

Then... well it's supposed to say TICK 2500, to make it fire about every two and a half minutes or so. But I typo'd and wrote TICK 500. So right now it's firing about every 20 seconds. Whoops. Proofread your script! XD Someone else had to point that out to me. I'd totally missed it. It's probably contributing to some lag at the moment, albeit not so much that I notice compared to the lag produced by the number of Norns I have active right now. Still, I intend to fix that to its intended value.

Then comes MVSF. That's where the engine should put the new agent. I copied this from another agent - I think the New Toy Smell agent actually. If I read it right it places the new agent wherever the Hand happens to be at the moment of injection, but I might be wrong. It doesn't entirely matter where this particular agent physically goes, anyway, since its function will work no matter where it is on the map.

SLOW comes next, and that's another bit of the copied code so I forget what that does. I'd look it up but it's 4:30 in the morning as I type this and I'm feeling distinctly lazy. Sorry! :p I'll edit this later to fix it if I don't forget.

And that's the installation script. Pretty easy, right? You have no idea how proud I am of myself for figuring all this stuff out. For the longest time, CAOS would just dissolve into a big, incomprehensible mess when I looked at it, like numbers tend to. But I'm trying to learn to think of them as words instead of number-like things, and that's been helping.

Anyway, so far all we've done is make the agent. We haven't told it to do anything yet. So here's the timer script.

scrp 1 1 36100 9
enum 2 13 0
emit 19 0.9
next
enum 2 15 0
emit 19 0.9
next
endm

SCRP tells the engine to associate the code to follow with the agent we just created, using its classifier (1 1 36100 in this case.)

The ENUMs are telling the engine which agents are to be affected by the script. In this case, it's critters and bugs.

EMIT is the core of the agent. This is the bit that tells the engine to make the specified agents produce a CA. In this case, I chose to have CA 19 emitted at a rate of .9. This is very high, but I did that on purpose to make up for the fact that CFF/TWBs have a harder time focusing than normal. (I realized later that because bugs and critters move around, navigating to them is harder to begin with, another reason to make them smellier so even Norns that are pretty far away from them can still get moving in the right general direction.)

NEXT of course moves us to the next operation.

ENDM closes this part of the script.

I'll probably want to remove it at some point, if only to replace it with an updated version of the script. And what if I release this to other people? They may want to swap it out for the New Toy Smell or something else at some point. Or they just might want to get rid of it. So it needs a remove script:

rscr
enum 1 1 36100
kill targ
next
scrx 1 1 36100 9
enum 2 13 0
emit 19 0
next
enum 2 15 0
emit 19 0
next

RSCR tells the engine this is a remove script, of course.

ENUM, as noted before, specifies which script is to be affected.

KILL TARG and SCRX destroy the agent. To be thorough, we also specifically tell the engine to make bugs and critters emit CA 19 at a rate of 0 - in short, to stop emitting it.

And that's it! It's a very simple thing, but I'm crazy proud of myself for putting it together. I've tried a few CAOS projects before, but I'd always end up getting lost in stuff I couldn't make sense of. This is the first time I've been able to read it all and keep reading it and have it not fall apart. Take that, dyscalculia! >D

And how does it work? Like I mentioned, since bugs and critters move around, they're harder to use as a navigational tool than food, fruit, or seeds. So they're only somewhat better at that IQ test. But they no longer do that confused 'pacing' thing - they rise up or drop down confidently to snatch previously out of reach birds and fish. And the flying ones are making much more use of their ability. Though since installing C12DS they still spend a lot of time on the ground, more individuals are spending more time in the air, and flying to greater heights more often. This is often driven by prey-seeking behavior. Even when not hungry they like to follow flying birds or fish and seize them. This is less evident in the ones with the old hunting instincts silenced, but they still exhibit a distinct tendency to do that, which I interpret as them following the scent. Their genes still need some tweaking to balance Hunger Overwhelmsion and suchlike, but the agent seems to be working more or less the way I hoped it would.

So I'm pretty happy. And so are they! :)

Poor Lectern Celerity. It's a tossup whether he'll starve to death before his organs fail. But either way he'll probably hit 14 hours, which is about the most a Dragon Norn can ever hope for, so he was a very successful Norn all things considered! I just wish he would leave those yellow birds alone and eat a Balloon Pigeon.

EDIT: After finishing this post, I went to look at my game and found a Dragon - an old male, over 13 hours old - chasing the yellow birds in the sky above the garden. He'll die pretty soon. His brain is at like 20-some percent. So he's not getting the hint and moving on like the younger ones usually do. I felt bad for him and tried to redirect his attention by moving the yellow birds out of his eyesight and putting a Balloon Pigeon close to him. Before, that always used to work. But when I moved that bird he was on it like a shot! He followed it like he had an invisible leash attached to him. I was really surprised, and experimented. Sure enough, unless I moved so fast it whipped out of sight before he could decide to follow it (and thus got distracted by a closer bird before he -could- decide to follow), he would follow the bird he'd originally focused on no matter where I moved it. Fascinating! The agent is definitely working. It also suggests a new application I hadn't thought of - I could make a hungry Dragon Norn go anywhere by leading it carrot-on-a-stick style with a critter or bug in the hand!


Comments

Popular posts from this blog

*Final Fantasy victory tune*

The Devil's Re-Jects