What if you were given the perfect diet plan for your body — and the perfect exercise program? The idea that our genes affect our weight is not new, but lately there has been more evidence explaining how this happens.

Some of the genetic bases for the diseases of obesity have been discovered, such as a gene that appears to cause calories to be stored as fat rather than burned for energy. Even though only about half of the variation in your BMI (body mass index) is attributable to genes, our genes interact with things like the environment a person lives in and their diet and exercise patterns to produce individual weight and fitness levels. That is why, for example, exercise may be more effective for some people than others for weight loss.

Health experts at the University of Texas at Austin believe that within five years it will be possible to use a combination of genetic, behavioral, and other data to develop individualized weight loss and weight maintenance plans for people. They call it “precision weight loss.”

Some of the tools for collecting the sort of information needed for precision weight loss are already available, such as genome sequencing and portable monitors to track people’s activity in real time.

In their report on the genetics of weight loss published in Obesity, UT researchers summarized what is known about the factors that influence weight loss and regain, and identified how genetic information may soon be used in research and the treatment for obesity.

Several genes probably interact with each other in weight loss and maintenance. So in the future people might have DNA samples combined with data collected from portable sensors about their environment, diet, activity level, and stress. The resulting computer algorithm would generate specific recommendations for achieving their target weight, according to Molly Bray, a geneticist and professor of nutritional sciences at The University of Texas at Austin.

Certain tools for collecting the sort of information needed for precision weight loss are already available. The cost of genome sequencing is going down and portable monitors like Fitbit which can track people’s activity in real time are among those tools. Still needed, however, according to the report, are better technologies to pinpoint the relationships among genetics, behavior, and diseases of obesity.

Obesity is one of the most serious problems of our era, Dr. Bray believes. So the time has come to pull together all the data that has been collected about what drives eating behavior, how fat cells are formed, and how obesity and weight loss alter metabolism to find ways to treat obese people more effectively.

The report in Obesity was developed from research done at institutions all over the world and presented at a workshop held by the National Institutes of Health in 2014.