PROJECT SUMMARY: PROJECT 3 In the modern, post-pandemic world, digital technology is becoming an increasingly important vehicle for the delivery of substance use disorder (SUD) and HIV prevention, treatment, and recovery services. The long-term goal of the proposed project is to enable digital health technology to deliver intervention services with unprecedented effectiveness and sustainability. We propose to integrate ideas from behavioral science and artificial intelligence to develop methodology for (1) continual optimization of just-in-time adaptive digital health interventions in response to societal changes and evolving population treatment needs and (2) personalized just-in-time adaptive digital health interventions to each individual's evolving treatment needs. This will enable a second generation of just-in-time adaptive digital health interventions with enhanced and highly sustainable effectiveness. To achieve this long-term goal, we will: (Aim 1) Promote sustainable intervention effectiveness and engagement by integrating approaches from artificial intelligence — namely reinforcement learning — to develop algorithms that continually optimize mobile health interventions over time; (Aim 2) Meet differential individual needs by generalizing Aim 1 algorithms to construct and continually optimize person-specific mobile health interventions; (Aim 3) Test, evaluate, and refine the algorithms developed in Aims 1 and 2 in extensive simulations; and (Aim 4) Disseminate the developed algorithms so that they can be readily applied in SUD/HIV prevention, treatment, and recovery. We will conduct workshops for SUD/HIV scientists and publish both tutorials and new research in SUD, HIV, and methodology venues. We will work with the Dissemination and Training Core to develop free, user-friendly software that will enable SUD/HIV scientists to develop, optimize, and evaluate their own just-in-time adaptive digital health interventions.