The power grid is in the midst of transforming from a model of centralized generation and one-way power flows to one with distributed generation. In this talk, I will describe some of the challenges presented by the coming smart grid, and research projects at LLNL using collaborative autonomy, a form of machine learning, aimed at overcoming those challenges. I will also briefly discuss the broader Cybersecurity and Infrastructure Resilience program at LLNL.