Immune checkpoint inhibitors have been shown to be highly successful against some solid metastatic malignancies, but the overall patient response rate is limited due to the interpatient heterogeneity. In this project, we explored the effect of favorable and unfavorable gut bacteria on the therapeutic efficacy of anti-PD-1 against cancer by modeling the tumor-immune-gut microbiome interactions, and further examined the predictive markers of responders and non-responders to anti-PD-1. The dynamics alteration of PD-L1 expression status during cancer evolution and treatment are also obstacles for PD-1/PD-L1 inhibitors. We established a comprehensive modeling and computational framework for estimating the dynamic alternation of PD-L1 heterogeneity during cancer progression and treatment, and predicting the overall survival of patients, and further explored the adaptive therapy of administering anti-PD-L1 according to dynamic of PD-L1 state among cancer cells