California is the world’s preeminent base for leading artificial intelligence companies, giving lawmakers in Sacramento a front-row seat to the ascendant industry — and thus a way in to regulating it.