Android's battery life will be managed by AI in Android P so users should have a much easier time keeping their devices powered on throughout the day without needing to recharge as often, at least that is likely the reasoning behind Google's decision to work this capability into the software. The feature is called Adaptive Battery and according to Google it'll decrease the amount of times the CPU inside the phone wakes up the screen because of apps running in the background by up to 30-percent, which should be a big boost to the battery life of the device throughout the day.
Based on Google's details in during the Google I/O 2018 keynote the Adaptive Battery feature will use the AI to scan for apps running in the background that you haven't used after a certain period of time, and it will close them down so they don't continue to suck the battery life out of your device. What's more is that adaptive battery will also handle managing and adjusting your display's brightness based on how you use the device. There wasn't much detail on how or if the Adaptive Battery feature would work with the Adaptive Brightness feature, but Adaptive Brightness will end up working based on your activities in addition to the amount of light picked up the sensors, so Google is improving it and it could work well together with Adaptive Battery if both features are toggled on.
What's more is that Adaptive Brightness will be able to learn your preferences for screen brightness if you manually adjust the slider for it. Since this is baked into the AI integration there's no telling how long it will take to learn your preference for brightness but it'll likely take a little bit of time. Google doesn't mention when exactly it plans to roll this out, but if it's part of Android P then it may debut with the second developer preview.