Genetic Network Programming (GNP) extended from other evolutionary computations such as Genetic Algorithm (GA) and Genetic Programming (GP) has network structures as gene. Previously, the program size of conventional GNP was fixed and GNP programs have not introduced the concept of sub-routines, although GA and GP paid attention to sub-routines. In this paper, a new method where GNP with Automatically Generated Macro Nodes (GNP with AGMs) composed of a number of nodes is proposed for improving the performance of GNP. These AGMs also have network structures and are evolved like main GNP. In addition to that, AGMs have multiple inputs and outputs that have not been introduced in the past. In the simulations, comparisons between GNP program only and GNP with AGMs are carried out using the tile world. Simulation results shows that the proposed method brings better results compared with traditional GNP. And it is clarified from simulations that the node transition rules obtained by AGMs show the generalized rules able to deal with unknown environments.