New sight and smell variables added to define dinosaur species.

Two new values have been added to describe a dinosaur species: Angle of Vision and Olfactory Acuity. Screen capture (click to enlarge). Note: the T. rex Angle of Vision has been increased to 55 degrees per, "Binocular Vision in the Theropod Dinosaurs by Kent Stevens".

Two new values have been added to describe a dinosaur species: Angle of Vision and Olfactory Acuity. Screen capture (click to enlarge). Note: the T. rex Angle of Vision has been increased to 55 degrees per, “Binocular Vision in the Theropod Dinosaurs by Kent Stevens”.

We’ve added two new variables to describe a dinosaur species: Angle of Vision and Olfactory Acuity. The Angle of Vision describes the width of the field of vision for a dinosaur. The greater the number the greater ‘peripheral vision’ the dinosaur has. Olfactory Acuity represents the dinosaur’s ‘sense of smell’. We know that some dinosaurs had large olfactory bulbs from casts of their brain cases.

It is widely understood that predators, like T. rex had stereoscopic vision, like humans but their field of vision was limited to about 20 degrees while prey animals, like Edmontosaurus had eyes set far apart on their heads which allowed for very wide fields of vision.

In this screen capture from the Dinosaur Island AI testbed program you can see a T. rex with narrow field of vision (shown by the blue lines) and two Edmontosaurus with much greater field of vision. Click to enlarge.

In this screen capture from the Dinosaur Island AI testbed program you can see a T. rex with narrow, 20 degree field of vision (shown by the blue lines) and two Edmontosaurus with much greater (120 degree) field of vision. Click to enlarge.

In the above screen capture you can see the difference in predator and prey fields of vision. This will have an important impact on the AI that governs prey stalking and herbivore defensive strategies. In our previous post (Calculating the ‘cone of stink’ for a T. rex) we demonstrated how a T. rex would have to maneuver downwind of its prey before beginning it’s final rush towards its victim. A herd of Edmontosaurus, however, had numbers on their side. More eyes scanning the terrain might well give advance notice of an impending predator attack.

In the next few weeks we will see the AI for both these attack and defense strategies implemented.

SmallRuleFollowing a comment from Paleontologist Dr. Jordan Mallon (below) with a link to the paper, “Binocular Vision in Theropod Dinosaurs” Stevens, Kent, Journal of Vertebrate Paleontology 26(2): 321-330 June 2006, we’ve modified the field of vision for the T. rex to 55 degrees and the Edmontosaurus to 145 degrees (see screen capture below).

Screen capture from the Dinosaur Island AI Testbed program showing a T. rex with a 55 degree field of vision stalking an Edmontosaurus with a 145 degree field of vision.

Screen capture from the Dinosaur Island AI Testbed program showing a T. rex with a 55 degree field of vision stalking an Edmontosaurus with a 145 degree field of vision.

Specific information about the field of vision for hadrosaurs (like Edmontosaurus) does not appear to be available however, quotes such as, “The eyes were placed on the sides of the head which suggests that hadrosaurs were probably specialized for wide-field rather than for binocular vision,” definitely suggest a very wide field of vision.

Dinosaur Island is specifically designed to easily change values such as field of vision for a species.

Share

Calculating the ‘cone of stink’ for a T. rex

Calculating the direction and intensity of the smell from a T. rex. Note wind direction and speed at bottom. Screen capture from Dinosaur Island AI testbed (click to enlarge).

Calculating the direction and intensity of the smell from a T. rex. Note wind direction and speed at bottom. The red line is the direction that the T. Rex named Bob’s scent is being carried. Angle from Gertie to Bob is blue line. Screen capture from Dinosaur Island AI testbed (click to enlarge).

Yes, it has come to this: we are calculating the ‘cone of stink’ of a T. rex.

I’m working on not just the ‘combat models’ for Dinosaur Island see (“Creating a combat model for T. rex versus Edmontosaurus regalis“) but the AI that drives the decisions and actions of the dinosaurs as well. While creating the AI I realized that scent was probably as important as sight to any dinosaur that didn’t want to become dinner. At the same time, predators – successful predators – should take wind direction into consideration when planning their attacks and consequently maneuver to be downwind of their prey.

After watching a number of predator / prey scenarios in Dinosaur Island I became convinced that the T. rex didn’t just see an Edmontosaurus from 500 meters away and start charging towards it. I think the T. rex maneuvered into position (downwind) and only then ran at top speed when it was within 50 meters of the victim. I don’t think that a T. rex had energy to burn – and they sure burned a lot of energy running with all that weight at top speed – and even an unarmored prey like Edmontosaurus could pack a terrific wallop with its tail if it was forewarned.

As we shall see in the next few postings, dinosaur predators were not just big dumb brutes and scavengers.  For them to survive they had to plan their attacks in advance or be incredibly lucky. Also, we shall see how ‘olfactory acuity’ and ‘angle of vision’ played an important role in detecting predators before it was too late for big herbivores like Edmontosaurus and that the key to their survival involved group defensive tactics.

Share

Creating a combat model for T. rex versus Edmontosaurus regalis.

A T. rex is attacking an Edmontosaurus while it's companions flee (screen capture of the AI test bed program). Click to enlarge.(screen capture of the AI test bed program).

A T. rex (Bob) is attacking an Edmontosaurus (Julie) while its companions (Gertie & Muffie) flee (screen capture of the AI test bed program). Click to enlarge.

We are at the point in the development of the AI routines for the inhabitants of Dinosaur Island where it is time to make decisions about the combat models used to determine the resolution of hostile encounters. As shown in the screen capture of the Dinosaur Island AI testbed program (above), the simulation is placing the dinosaurs in various appropriate states such as: resting, eating, looking for food, looking for water, stalking prey, moving towards water, moving towards food, drinking, fighting and fleeing.

My first thought on the subject of modeling combat between T. rex and Edmontosaurus regalis, the first two resident species on the island, was that it would be handled similar to ‘melee combat’ models that I had previously used for my wargames.

Below is a page from the manual for UMS II: Nations at War explaining the 20 variable equation used to decide combat between tactical units.

The 20 variable equation used to calculate combat in our UMS II: Nations at War (c. 1992). (Scan from user's manual). Click to enlarge.

The 20 variable equation used to calculate combat in our UMS II: Nations at War (1989). Scan from user’s manual. Click to enlarge.

I was envisioning something similar for Dinosaur Island until I happened to see this video (below) which includes a sequence (starting at 4:45) describing hypothetical Edmontosaurus and T. rex combat.

What I took away from the video was:

  • Edmontosaurus regalis  is bigger than I thought. I understood the size mathematically and that they could easily grow up to 13 meters (~ 40 feet) but it wasn’t until I saw this video that it was put in perspective, “they were as big as a railroad car.” And, “they could look into a second story window.”
  • The tail of an adult ‘bull’ Edmontosaurus regalis  was a formidable weapon.
  • T. rex, like many predators, would have preferred to attack adolescent or sick animals rather than encounter a full-size, and potentially lethal, ‘bull’.
  • The correct pronunciation is Ed-MONT-o-saur-us. I’ve been saying it wrong for the last six months!

While there is still debate about whether T. rex was a predator or a scavenger (“Tyrannosaurus rex may have been an apex predator, preying upon hadrosaurs, ceratopsians, and possibly sauropods, although some experts have suggested it was primarily a scavenger. The debate over Tyrannosaurus as apex predator or scavenger is among the longest running in paleontology.” – Wikipedia) we know of at least once case where a T. rex tooth was found in an Edmontosaurus tail that had healed from the attack (“T. rex Tooth Crown Found Embedded in an Edmontosaurus Tail – Predatory Behaviour?” “The healed bone growth indicates that the duck-billed dinosaur survived this encounter.  In February of this year, researchers from the University of Kansas and Florida reported on the discovery of evidence of a scar on fossilised skin tissue from just above the eye of an Edmontosaurus.  In a paper, published in “Cretaceous Research”, the scientists concluded that this too was evidence of an attack of a T. rex on an Edmontosaurus.”). From this we can conclude that:

  • Sometimes T. rex did attack a living Edmontosaurus.
  • Sometimes the Edmontosaurus survived the attack.

Furthermore, we know that some T. rex had suffered bone injuries during their lifetime (“An injury to the right shoulder region of Sue resulted in a damaged shoulder blade, a torn tendon in the right arm, and three broken ribs. This damage subsequently healed (though one rib healed into two separate pieces), indicating Sue survived the incident.” – Wikipedia) consistent with the type of damage that a 5 meter long tail (described as being “like a baseball bat,” in the above, video) could inflict.

In other words, combat between T. rex and Edmontosaurus regalis was not a foregone conclusion. Indeed, it was entirely possible that the Edmontosaurus could walk away unscathed while the T. rex could suffer some broken bones.

The AI for Dinosaur Island will reflect this. When deciding if the T. rex will attack the AI will have to analyze the T. rex‘s chances of victory and potential injuries (risk versus reward) considering the size of the T. rex, the age of the T. rex, the health of the T. rex, the size of the prey, the age of the prey and the health of the prey. And, when the two dinosaurs actually engage in combat the tactics employed by both will probably decide the outcome.

If the T. rex can sneak up on the Edmontosaurus until they are within 50 meters or less and then close the distance with a rush the advantage would certainly lie with the predator. If the Edmontosaurus has forewarning of the impending attack it would either attempt to flee or stand its ground and assume a defensive posture.

There is reason to believe that both Edmontosaurus and T. rex had well developed olfactory bulbs in their brains and smell was an important sense for both animals. We will add wind (and wind direction) to Dinosaur Island and incorporate this into the AI routines that control the dinosaurs. Predators will attempt to get ‘upwind’ of their prey; prey animals will ‘sniff’ the wind and respond if they smell a T. rex even if they can’t see it (see “Dinosaurs, tanks and line of sight algorithms” here).

Share

T. rex (AI) successfully locates and hunts prey on Dinosaur Island.

A T. rex named George successfully found, tracked, pursued and attacked an Edmontosaurus named Julie. Click to enlarge.

A T. rex named George successfully found, tracked, pursued and attacked an Edmontosaurus named Julie. Click to enlarge.

It has been said that nobody wants to see how politics or sausages are made. Artificial Intelligence (AI), for some, may also be added to that list. Today’s blog topic is about achieving an important milestone in the AI behind Dinosaur Island: a T. rex ‘looked’ around his virtual world (using a 3D line of sight algorithm), spotted potential prey (an Edmontosaurus regalis named Donna) pursued it using an optimized A* least weighted path algorithm that avoided steep slopes and boggy terrain (the attack was up hill) , then saw a more attractive target (an Edmontosaurus regalis named Julie), changed his pursuit and successfully overtook the prey.

This AI is unique and probably the first time such a series of events has been demonstrated in a 3D virtual world environment. Below are step by step screen captures showing the events:

Screen capture with all AI tracing turned on. There are three dinosaurs in this image. George sees Donna (dark red line)

Screen capture with all AI tracing turned on. There are three dinosaurs in this image. George sees Donna (dark red line), Donna is looking almost due east (dark red line) at the forest of Araucaria trees where she wants to go to eat, the cloud of yellow is the AI looking at alternative paths for Donna to climb up a hill, Julie is also looking at the same forest of Araucaria trees to her northeast and the AI (yellow path) has plotted the best route for her to climb the hill. (Click to enlarge).

AI2

This screen capture taken 10 seconds later shows Donna approaching the Araucaria forest to the east and Julie climbing the hill towards the same forest to the northeast. George now sees that Julie is the closest prey and switches his attack to her (dark red line) and races toward her. (Click to enlarge).

George has

Ten seconds later, George has closed the distance and has attacked Julie from the flank. (Click to enlarge).

It’s important to remember that Dinosaur Island will ship in full 3D; these screen shots are of the AI testing environment which is in 2D.

Now that we have created a ‘perfect killing’ AI we will have to make it ‘stupider’ by adding distractions and imperfections.

Share

Are we making the dinosaurs too smart?

Traces of the artificial intelligence (AI) calculations for dinosaurs' optimal paths to food. Screen capture.

Traces of the artificial intelligence (AI) calculations for dinosaurs’ optimal paths to food. The AI chooses paths with least steep slopes and avoids terrain (like swamps) that would unnecessarily slow the dinosaur down. Screen capture.

Yes, I know in Jurassic Park velociraptors could open doors (I would post a picture, but I’m worried about lawsuits so here’s a link to the clip instead). Luckily, on Dinosaur Island we don’t have any doors, kitchens, cages, Land Rovers or electric fences so we don’t have to worry about writing the artificial intelligence (AI) routines for the dinosaurs to deal with these objects.

Instead, we’re interested in if the dinosaur can see the food (I discussed 3D line of sight algorithms in, “Dinosaurs, tanks and light of sight algorithms,” here). And, if and only if, the dinosaur can see the food, how does the dinosaur get to the food? The fastest way for the dinosaur to get to the food can be solved using a least weighted path algorithm which I discussed in this blog here.

Now, the question is, “are we making the dinosaurs too smart?” The image at the top of today’s blog is a screen capture of the AI ‘looking’ at different ways to get to the objective (in this case, food that has been identified previously using the 3D line of sight algorithm). From literally thousands of possible routes (some only deviating by a meter from another possible route) the optimal, or fastest route across the landscape (avoiding steep hills and terrain that would slow the dinosaur down) is chosen.

Is this really how a dinosaur thought?

Probably not. What I suspect, and again, I’m a computer scientist, not a paleontologist, is that dinosaurs, especially a dinosaur pursuing prey, ran straight towards the target until it encountered something (an obstacle, a steep hill, swampy land) and only then considered going on an alternative path.

So, I will probably rewrite the AI so it’s not optimal. But for now, we’ve got some really smart predators on Dinosaur Island. Not opening doors smart. But smarter than the real thing.

SmallRuleBelow is a screen capture of the optimized AI least weighted path algorithm.

Screen shot of optimal least weighted path algorithms (taking slope and terrain into effect). Screen capture (click to enlarge).

Screen shot of optimal least weighted path algorithms (taking slope and terrain into effect). Dark red lines: 3D Line of sight (the food that the dinosaur is looking at). Orange lines: final path for dinosaur. Yellow areas: alternative paths that were evaluated and discarded. Screen capture (click to enlarge).

Share