Dinosaur Dilemma: Simulating Dinosaurs and Avocado Trees

by vs
GNU/Linux ◆ xterm-256color ◆ bash 561 views

This is the first example of running the Dinosaur Dilemma Simulation. In this simulation, we randomly choose:

  • a season (and length of season)
  • a temperate and humidity (given the season)
  • some number of dinosaurs
  • some number of avocado trees

and initialize them to be placed on a grid (the environment). We then cycle through some number of days, and for each day, modify the environment, have the entities adjust to the environment, and then interact as they move. This asciinema shows basic setup of the environment, and then moving (and when they interact) although no action is taken yet other than printing the interaction to the screen. I’ll next define different interactions to happen between dinosaurs and avocado trees depending on size / height, hunger, etc. I’ll also need to better update each entity based on progression of the simulation (e.g., as time passes, the dinosaur gets hungrier).

What are we interested in?

At the end of the simulation we will be interested in how evolution happened, namely how many dinosaurs and trees are left, whether the dinosaurs are herbivores or driven to be carnivorous, and how breeding resulted in different genders / dinosaurs with attributes.

More by vs

ebpf profiling lammps 00:34

by vs

Watchme Terminal Watcher 03:46

by vs

Fireworks Stage 2 00:14

by vs

Fireworks Stage 6 00:17

by vs

See all