# New scent detection algorithm integrated into Dinosaur Island.

The finished equation for determining the probability of a dinosaur detecting the smell of another given wind direction, velocity, distance and bearing. Click to enlarge.

Above is the equation for calculating the probability that one dinosaur can smell another dinosaur given the wind direction, wind velocity, distance and bearing of dinosaur one to dinosaur two. A great deal of work went into this equation and I must thank my good friends and colleagues, Alberto Segre and Mike Morton, for all their help, feedback and encouragement.

Below are examples of the output of the equation with various wind direction and wind velocities:

Results of the equation showing likelihood of detecting a scent at a specific location given the wind direction and wind velocity. Each square is 100 meters.

Results of the equation showing likelihood of detecting a scent at a specific location given the wind direction and wind velocity. Each square is 100 meters.

Results of the equation showing likelihood of detecting a scent at a specific location given the wind direction and wind velocity. Each square is 100 meters.

Below is a screen capture from Dinosaur Island showing the results of the new scent detection algorithm (coupled with the newly added olfactory acuity variable, see New sight and smell variables added to Dinosaur Island).

Screen capture of Dinosaur Island with new scent detection algorithm integrated into the AI. Note AI output on right (highlighted by red box): Gertie, the Edmontosaurus, cannot see Jim, the T. rex, but she can smell him. Click to enlarge.

While developing the scent detection algorithm and reading about the extent and frequency of injuries sustained by T. rex (broken ribs appear in about 25% of known T. rex fossils) it seemed very likely that an old T. rex (and T. rex did not achieve sexual maturity until their twenties) had to be a very cautious hunter. An Edmontosaurus regalis tail could break T. rex ribs if the Edmontosaurus was aware that the T. rex attack was imminent. As we will see in the next post, a smart hunting T. rex must have had to employ clever tactics to avoid both visual and olfactory detection as it approached its prey.

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

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 (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).

# Tyrannosaurus rex hunting an Edmontosaurus regalis

A Tyrannosaurus rex (Barney) on the left has identified an Edmontosaurus regalis (Gertie) on the right. Red lines indicate respective dinosaur’s goals (food). (Click to enlarge.)

Today the AI (Artificial Intelligence) routines for the inhabitants of Dinosaur Island to identify food were put in place and tested. The above screen capture shows the results: Gertie, a hungry Edmontosaurus regalis, has spied a forest of Araucaria trees on higher ground about 55 meters to the north-northeast. Barney, a very hungry nine year-old Tyrannosaurus rex has spotted Gertie 145 meters almost due east on the other side of a creek bed lined with Nipa plants. This doesn’t look good for Gertie. Will one and a half football fields be enough of a head start? How long will Barney pursue dinner before the energy expended will be too great? Look at Barney’s health. He hasn’t eaten for a while and he doesn’t have much energy left.

A reminder: the 2D ‘top down’ version of Dinosaur Island is just for testing and scenario creation purposes. Dinosaur Island will be released in full 3D. Dinosaur Island is a unique interactive simulation of real dinosaurs in their natural environment.

# A few more screen shots.

A map of Nipa plants on Dinosaur Island.

Detailed Information about a Nipa plant in a swamp.

Dr. Karen Chin has suggested that Nipa and Araucaria plants would be a suitable food source for Edmontosaurus on Dinosaur Island. Pictured above are two new screen shots showing a map of where Nipa plants are growing in a swamp and by rivers. The second screen shot shows detailed information about one square meter of Dinosaur Island. It is important to remember that Dinosaur Island will be in 3D. Just the utilities needed to create the island are ‘top down’ and in 2D.