  An agent, artificial or human, must be continuously adjusting its behaviour
in order to thrive in a more or less demanding environment. An artificial agent
with the ability to predict human emotional valence in a geospatial and
temporal context requires proper adaptation to its mobile device environment
with resource consumption strict restrictions (e.g., power from battery). The
developed distributed system includes a mobile device embodied agent (SensAI)
plus Cloud-expanded (Expanse) cognition and memory resources. The system is
designed with several adaptive mechanisms in a best effort for the agent to
cope with its interacting humans and to be resilient on collecting data for
machine learning towards prediction. These mechanisms encompass
homeostatic-like adjustments such as auto recovering from an unexpected failure
in the mobile device, forgetting repeated data to save local memory, adjusting
actions to a proper moment (e.g., notify only when human is interacting), and
the Expanse complementary learning algorithms' parameters with auto
adjustments. Regarding emotional valence prediction performance, results from a
comparison study between state-of-the-art algorithms revealed Extreme Gradient
Boosting on average the best model for prediction with efficient energy use,
and explainable using feature importance inspection. Therefore, this work
contributes with a smartphone sensing-based system, distributed in the Cloud,
robust to unexpected behaviours from humans and the environment, able to
predict emotional valence states with very good performance.
