About Me

My photo

My goal is to make a difference in the world, and I think the way to do that is through games. My education is in programming and 3D animating, and I have worked in e-Learning and game development. 

Tuesday, August 22, 2017

Game AI: Non-Human Behavior Part 4

This is part 4 of a series on Game AI for Non-Human Behavior. Here's what you might have missed!
  • Part 1: Defining "Game AI" and "Non-Human Behavior"
  • Part 2: Making Decisions, Predators and Prey
  • Part 3: Weird Inspirations from Nature
 Today let's talk about how creatures in the wild go about hunting.

Living things need food to survive. There are different ways to get food - some plants make their own food, some animals eat plants, and some creatures hunt. Hunting generally refers to actively pursuing your food, but for the purpose of this post I'm going to expand it to include luring your food to come to you.

Source: https://www.youtube.com/watch?v=z5fOsgrAJiU
Here are a few of the tactics that predators use to catch their food:
  • Speed
  • Strength
  • Traps / Lures
  • Stealth / Camouflage
  • Teamwork
  • Built-in Tools (ie. claws and teeth)
The Venus Fly Trap is a fabulous example of  a lure / trap. Predatory plants have adapted this way of life because they live in environments where it is challenging to absorb nutrients from the ground using roots. So, they capture little packets of nutrients from the air in the form of insects. Predatory plants have different methods of luring prey including bright colors and sticky nectar. Once a fly is lured into the danger zone, the Venus Fly Trap has special hairs inside it's "mouth" that detect when something bumps against it. On the second bump, the trap will close. That's some interesting and clever behavior there - if it immediately started closing, the fly could still be airborne and would have an easier time escaping, so by waiting for the second bump the fly is lulled into a false sense of security thinking it can safely land. After the trap has closed, it waits for 5 more stimuli of the hairs before it begins digestion, to ensure the thing it trapped is actually an edible insect wriggling around.

Source: keywordsuggest.org/gallery/242369.html
Another clever take on luring prey is the Angler Fish, which has a glowy lure on top of it's head that attracts unsuspecting fish into its terrifying mouth. Using traps and lures can save a lot of energy, because you don't need to move around as much if your food comes to you.

Source: www.flickr.com/photos/uswildlifeimagescom/5733874585
Birds have some of the scariest built-in tools in the form of deadly talons. Talons can be used for a variety of killing purposes including dismemberment and squeezing to death, and can be used in combination with the beak to tear critters into bite-sized pieces (sometimes while the critter is still alive).

Source: http://tigers4kids.weebly.com/hunting--diet.html
Big Cats can cover the spectrum of strength, speed, stealth, and teamwork, but they are certainly not the only ones. Tigers are known for their tremendous strength which allows them to take down prey in their solitary lifestyle.

Source: http://southernafricatravel.com
Lionesses work together to bring down prey that would be much too large and fast to bring down solo. While working together, the lionesses also employ stealth to sneak up close to their prey before begging the chase.

Source: https://s-media-cache-ak0.pinimg.com/originals
/62/c0/d2/62c0d2b7d56679af09270d36e72a5f5c.jpg
Cheetah, being the fastest land animal, is a go-to example of using speed for hunting. Cheetahs can reach top speeds of 60 miles per hour, though only for short sprints. Perhaps more impressive than their top speed is how quickly they can start and stop a sprint.

Source: wideopenspaces.com/10-animals-school-humans-camouflage/
Leopards are a master of camouflage, their patterns of spots help them melt into the shadows of trees and brush.

Many of these methods of hunting can also be used by prey to avoid being hunted. Prey rely on their speed, strength, teamwork, and stealth to stay alive in a dangerous world. And all of these methods can be applied to your characters when design your AI's behavior in games.

No comments:

Post a Comment