  Dynamical system methods are used in the study of the stability of spatially
flat homogeneous cosmologies within a large class of generalized modified
gravity models in the presence of a relativistic matter-radiation fluid. The
present approach can be considered as the generalization of previous works in
which only $F(R)$ cases were considered. Models described by an arbitrary
function of all possible geometric invariants are investigated and general
equations giving all critical points are derived.
