Talk presented at the 2018 machine learning for programming languages workshop colocated with ECOOP in Amsterdam. This work presents the use of reinforcement learning for the discovery of context objects to drive behavioral adaptations. Our technique uses information gathered from the systems environment to define context, associating the actions taken by the user in such situations to define and automate behavioral adaptations