  We analyze the non-equilibrium dynamics of a gas of interacting photons in an
array of coupled dissipative nonlinear cavities driven by a pulsed external
coherent field. Using a mean-field approach, we show that the system exhibits a
phase transition from a Mott-insulator-like to a superfluid regime. For a given
single-photon nonlinearity, the critical value of the photon tunneling rate at
which the phase transition occurs increases with the increasing photon loss
rate. We checked the robustness of the transition by showing its insensitivity
to the initial state prepared by the the pulsed excitation. We find that the
second-order coherence of cavity emission can be used to determine the phase
diagram of an optical many-body system without the need for thermalization.
