We study an evolutionary prisoners dilemma game with two layered graphs, where the lower layer is the physical infrastructure on which the interactions are taking place and the upper layer represents the connections for the strategy adoption (learning) mechanism. This system is investigated by means of Monte Carlo simulations and an extended pair-approximation method. We consider the average density of cooperators in the stationary state for a fixed interaction graph, while varying the number of edges in the learning graph. According to the Monte Carlo simulations, the cooperation is modified substantially in a way resembling a coherence-resonance-like behavior when the number of learning edges is increased. This behavior is reproduced by the analytical results.