  In this paper, we consider both finite and infinite horizon discounted
dynamic mean-field games where there is a large population of homogeneous
players sequentially making strategic decisions and each player is affected by
other players through an aggregate population state. Each player has a private
type that only she observes. Such games have been studied in the literature
under simplifying assumption that population state dynamics are stationary. In
this paper, we consider non-stationary population state dynamics and present a
novel backward recursive algorithm to compute Markov perfect equilibrium (MPE)
that depend on both, a player's private type, and current (dynamic) population
state. Using this algorithm, we study a security problem in cyberphysical
system where infected nodes put negative externality on the system, and each
node makes a decision to get vaccinated. We numerically compute MPE of the
game.
