Algorithms underlying flexible phototaxis in larval zebrafish.