A dinosaur brain. Image copyright http://www.Pharynula.org

This is being reposted from my other blog on Artificial Intelligence (AI), “21st Century AI.”

I’ve just finished the basic tools for creating the island, indicating terrain types, ‘planting vegetation’ and am now working on the food chain models (for Dinosaur Island). After that the next job is actually creating the AI for the dinosaurs.

I’ve been thinking: after creating AI that can perform tactical analysis as quickly and accurately as human subject matter experts (see TIGER: An unsupervised machine learning tactical inference generator) writing the AI that controls giant herbivores and T. rex (the jury is still out if T. rex was a hunter or a scavenger) seems like it will be pretty easy. Indeed, my thoughts last night were that I need to keep the AI really simple and not to over-think the problem.

In turn-based game AI (like chess) we use the term ‘ply’ to indicate one move by one side. For example, if in chess, white makes a move and then black makes a move that is “two plies”. When Garry Kasparov was asked how many moves ahead he thinks he replied, “… that it depended on the positions of the pieces. “Normally, I would calculate three to five moves,” he said. “You don’t need more…. But I can go much deeper if it is required.” For example, in a position involving forced moves, it’s possible to look ahead as many as 12 or 14 moves, he noted.” (Ivars Peterson’s MathTrek). With dinosaur AI we’re definitely looking at 1-ply thinking; that is to say, dinosaurs didn’t think ahead at all.

I will probably implement some form of ‘finite state machine’ (FSM) AI for the dinosaurs. With FSMs the dinosaur will always be in some ‘state’ (no, not Montana or Iowa). Typical states for a dinosaur are: finding food, eating food, sleeping and reproducing. One of the problems with FSMs is the transition from one state to another. Frequently, NPCs (Non Player Characters) in games are driven by FSMs. This is why NPCs often behave so ‘woodenly’. A guard will either just stand in front of the cave entrance or march back and forth until something ‘trips’ (frequently it’s the player crossing an invisible tripwire) and the guard transitions to another state (attack the player). However, I’m thinking that dinosaurs really behaved that way: they had one thought – or better, ‘goal’ – at a time and that was it. No reasoning. No advanced planning. No cunning. Just input and reaction.

I’ve been reading a lot about dinosaurs recently (I really recommend The Complete Dinosaur, by the way) and looking at castings and reconstructions of dinosaur brains. Dinosaur brains were very primitive. The largest part of their brains were involved with input (usually smell but sometimes visual). They just didn’t have the resources for deep analysis.

So, for dinosaur AI, the key is going to be KISS: Keep It Simple Stupid.

UPDATE: I just read in Dale Russell’s, “Islands in the Cosmos: The Evolution of Life on Land,” “Observations on the learning capacity of crocodiles and lizards may provide some insights into dinosaurian learning abilities. Motivated by food, large Cuban crocodiles… have been trained, on command, to approach with their bodies off the ground, lunge upward from a bipedal position to retrieve bait, and then withdraw to water. Beginning with the third trial, they will approach when called by a name that has been applied to each reptile individually, and they can thoroughly master the procedure within 10 training sessions (Morrissiey et. al. 200; Morrissiey and Sancez 2004)” – p. 310.

So that certainly indicates that dinosaurs, especially predator dinosaurs, may be smarter than we thought. I had planned to track, for each dinosaur, the last five locations where it found food. Hopefully, this will create a more accurate dinosaur AI.

# What’s for dinner?

Abydosaurus having breakfast. (This was found on the internet without a credit; if this is your image, please let us know)

For the last week I have been busy researching the details of the food chain of the first inhabitants on Dinosaur Island: Tyrannosaurus rex, Edmontosaurus regalisNipa and Araucaria. The papers that I have been reading are: “Could Tyrannosaurus rex have been a scavenger rather than a predator? An energetics approach,” Ruxton and Houston, The Royal Society, February 2003; “Giants on the landscape: modeling the abundance of megaherbivorous dinosaurs of the Morrison Foundation (Late Jurassic, western USA),” Farlow, Caroian and Foster, Historical Biology, Vol. 22, No. 4, December 2013, pp. 403-429 and “Sauropod Feeding and Digestive Physiology, Hummel and Clauss, Biology of the Sauropod Dinosaurs”, Indiana University Press, 2011 pp. 11-33.

The first food chain on Dinosaur Island is illustrated below:

The T. rex, Edmontosaurus regalis, Nipa and Araucaria food chain. How much energy does the Edmontosaurus receive from eating one Nipa plant? How much energy does the T. rex receive from eating one Edmontosaurus?

What we are trying to ascertain is exactly how much energy is transferred each step of the way. How much energy does the Edmontosaurus receive from eating one Nipa plant? How much energy does the T. rex receive from eating one Edmontosaurus?

For example, in Sauropod Feeding and Digestive Physiology we learn that Araucariaceae is estimated by one source to produce 7.0 Mega Joules per kilogram of dry matter but by another source as between 6.3 and 10.8 Mega Joule per kilogram of dry matter. In Giants on the landscape: modeling the abundance of megaherbivorous dinosaurs of the Morrison Foundation one model is that the estimated energy consumption for a megaherbivore is  55 kilo Joules over kilograms of body mass0.75 per day and another model is for 550 kilo Joules over kilograms of body mass0.75 per day. In Was Tyrannosaurus rex a scavenger? there are also estimates for the energy produced per kilogram of carrion and the amount of energy needed by T. rex if it was a scavenger (slow moving) or a hunter (very fast moving).

As I’ve said before: I’m a computer scientist, not a paleontologist and right now I feel like I’m back in grad school just trying to keep up with my first year classes.  However, I have no doubt that Dinosaur Island will be a very useful tool for answering some of the questions raised in these papers.

# 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.

# The vegetation interface is done.

Part of the interface where the user can select what vegetation is planted in which environments.

Display of information about 1 square meter of Dinosaur Island.

Here are a couple more screen shots showing the interface for building Dinosaur Island. We want to make it as easy as possible to create new islands, with different terrain and plants from different ages.

This is important to remember: Dinosaur Island will be released in 3D. However, all the tools for creating the island, placing vegetation, creating different environments and terrains, and selecting and placing dinosaurs is done in a ‘top down’ 2D interface because – and trust us on this, we’ve had years of experience working on models and simulations – it’s just a lot easier to do it this way.

Now that the island is done, the different terrains and environments are done, the vegetation is planted… it’s time for the dinosaurs!

# The first of many thank-yous.

I apologize for not posting more this week on this blog, but I’ve been very busy working on the ‘behind the scenes’ stuff. In particular, I’ve been working on creating the database for all the plants and trees on Dinosaur Island (see the post, just below, on Planting on Dinosaur Island) to get a look at the ‘front end’ of the database).

The ‘front end’ of Dinosaur Island is being written in a computer language called C# using something called Windows Presentation Foundation (WPF). I’m not too familiar with WPF and a couple of days ago I was going crazy trying to find a bug in the interface for creating the plants and trees database. Finally, in desperation, I posted a note on Facebook asking if any of my friends, who knew C# and WPF especially, could help me find the bug. Not even thirty seconds elapsed before I got a message from Mike Splawski offering to help. Mike was a student of mine at the University of Iowa and he found and fixed the bug overnight. Thanks a million, Mike. I’m glad I gave you an ‘A’ for the class!

Also, I need to thank a number of paleontologists and paleobotanists who have been looking at Dinosaur Island and helping me out (especially with the problem of what specific plants and trees that specific herbivorous dinosaurs ate).

Dr. Bonnie Jacobs and Dr. Louis Jacobs, at SMU put me in contact with Dr. Karen Chin, the author of, “What Dinosaurs Ate,” a chapter in the fantastic book, “The Complete Dinosaur.” Dr. Chin very kindly called me and we talked over her research. She also made introductions for me to her thesis adviser, Dr. Bruce Tiffney, Dr. Jim Farlow, one of the editors of, “The Complete Dinosaur,” and Dr. Ian Miller who have all taken time from their busy schedules to write and respond to – what I assume are – my very naive questions.

Before Dinosaur Island is completed I’m sure there will be a long list of people that I will thank. A project like this is absolutely impossible without the kindness of strangers.