If you had lived 20,000 years ago, what would your diet have looked like? Certainly, your diet back then could not have been more different from our diets today. You would have eaten whatever you could gatherer, hunt or fish instead of what is convenient to heat up from the ready-to-eat meals in the grocery store.
Even if you are eating a diet that is considered as healthy, we have to admit, that there is still no consensus of what a healthy diet really looks like. Diet recommendations ranging from low-fat vegan diets over high-fat ketogenic diet to even carnivore diets.
I argue that knowing what our ancestors ate can be an important key to understand what would be the ideal diet for us today as our bodies are genetically adapted to the food we used to eat for most of humans history.
A basic principle in biology is that “everything needs to be viewed in the context of evolution” and proper dietary or health practices cannot do without the lens of evolutionary biology.
Hunting and gathering was humanity's first and most successful adaptation, occupying at least 90% of human history. Therefore, it makes sense to look at the composition of the diets of our hunter-gatherer ancestors to understand what might be the preferred diet of our bodies nowadays.
The diets of hunter-gatherer communites seem to be depedent on where they lived. Scientist found that people living close to the equator obtained about 50% of their diet from the gathered food and the other 50% from fish and hunted animals, but living further south or north rapidly decreases the number of gathered plants and increases the percentage of fish and meat. Assuming your ancestors dwelled somewhere in Europe they got about a third of their diet to equal parts from fish, meat and gathered food. 
Carbohydrate intake in Hunter-Gatherer Diets
To estimate the carbohydrate content of hunter-gatherer populations, researchers from Germany analyzed 229 hunter-gatherer diets around the world.
They found that especially cultures living in higher latitudes like hunter-gatherer in Europe consumed only 9-22% of their daily calories from carbohydrates. In fact, relatively low-carbohydrate diets in which less than one-third of the calories come from carbs were the most common way of eating around the world. The researchers say that “85% of the hunter-gatherer diets were characterized by a relatively low carbohydrate intake of less than 35% of the total energy, which reflected the high reliance on animal-based foods".” 
This research is backed-up by another research group from the Colorado State University that found that hunter-gatherers indeed consumed 45–65% of their energy need from animals. 
The Importance of Fat
Gathered food usually has two characteristics:
It is high in fiber
The calorie content is low (with the exception of nuts and seeds)
What actually made use humans become human were our increase in brain size. Throughout evolution, the brain size increased by 350% and it became the most metabolically energy-expensive organ in the human body, consuming about 25% of the adult’s calories, while only accounting for 2% of its weight. [4, 5]
To feed the energy-hungry brain, the early humans relied on another source of energy, especially if we consider that throughout evolution, our guts became smaller and less efficient to extract the energy from fiber-rich foods.
The authors of the paper “Man the Fat Hunter” explain that fat became of the most important source of calories. Fat provides 9 calories per gram, which makes it the most calorie-dense macronutrient compared to protein and carbohydrates, which only provide 4 calories per gram.
The authors say that “In order to not exceed the human limited ‘energy budget’, shrinkage in gut size, another metabolically energy expensive organ, was a necessary accompaniment. A shorter human gut, henceforth, had evolved to be more dependent on nutrient and energy-dense foods than other primates." 
The Brain relies on Ketone Bodies
However, the brain cannot simply use fats for energy. Long-chain fatty acids packed in lipoproteins or bound to carrier proteins cannot pass the blood-brain barrier, which is the barrier that protects the brain and therefore, fatty acids need to be converted into so-called ketone bodies to cross the barrier and to provide energy for the brain.
Ketosis is a metabolic state in which some of the body's energy supply comes from ketone bodies in the blood. It generally occurs when the body metabolizes fat and converts it thereby into ketones, a process called ketogenesis. Ketogenesis can be reached by either fasting or by restricting dietary carbohydrates to 5% of the daily caloric intake.
As a side note, compared to the 25% of energy an adult brain consumes, the brain of a newborn babies consumes about 75% of the total daily energy, and nearly half of it is actually provided by ketone bodies. Even a week later, after the carbohydrate content of breast milk increases, they still rely to parts on ketone bodies as an energy source. 
Dr. Cahill further shows in his article “Fuel Metabolism in Starvation” that newborn and children also reach the state of ketosis much faster than adults. In fact, newborn babies seem to be in a constant state of ketosis, which is defined by ketone levels higher than 0.5mM. 
If we come back to the question what our ideal diet would look like in the context of evolution we can clearly say that it depends to some parts on where your ancestors lived. But, even the diets of hunter-gatherer cultures living close to the equator rarely exceeded a carbohydrate intake of more than 30%, which makes it very different from the standard American diet today were 50-70% of the calories come from carbs. 
The carbohydrates were also packed in fiber that dampens the insulin response and ensures a healthy gut.
What about the Ketogenic Diet?
I would argue that low-carbohydrate diets were most common for almost all humans and that ketogenic diets were not unusual, especially during the colder months of the years and for humans living in higher latitudes.
Seasonal changes in food availability likely led to changes in the diet from low or moderate carbohydrate intake where about 30%-40% of the energy is provided by carbs all the way down to ketogenic diets were most of the energy was provided by fatty meat, fish, nuts, and seeds.
Take Home Message
Low-carb diets are the most common diets for hunter-gatherer around the world and ketogenic diets were common in higher latitudes.
Marlowe, Hunter-Gatheres and Human Evolution, Evolutionary Anthropology, 2005
Ströhle and Hahn, Diets of modern hunter-gatherers vary substantially in their carbohydrate content depending on ecoenvironments: results from an ethnographic analysis, Nutrition Research, 2011
Cordain et al., Plant-animal subsistence ratios and macronutrient energy estimations in worldwide hunter-gatherer diets., Am J Clin Nutr, 2000
Bolhuis et al., How Could Language Have Evolved?, PLOS Biology, 2014
Ben-Dor et al., Man the Fat Hunter: The Demise of homo erectus and the emergence of a new hominin lineage in the middle pleistocece (ca. 400 kyr) Levant, Plos One, 2011
Bougneres et al. Body Transport in the Human Neonate and Infant, J Clin Invest, 1986
Cahill, Fuel Metabolism in Starvation, Annu Rev Nutr, 2006
Allen et al., Low-carbohydrate diets, American family physician, 2006