Genetic Network Programming (GNP) has directed graph structures as genes, which is extended from other evolutionary computations such as Genetic Algorithm (GA) and Genetic Programming (GP). Generally, macroinstructions are introduced as sub-routines, function localization and so on. Previously, we have introduced the structure of macroinstructions in GNP named Automatically Generated Macro Nodes (AGMs) for reducing the time of evolution efficiently, and showed that macroinstructions are useful to acquire good performances. But the AGMs have fixed number of nodes, and it is found that the effectiveness of evolution of macroinstructions depends on the main program calling them and initialized parameters. Accordingly in this paper, new AGMs are introduced to improve their performances further more by the mechanism of varying the size of AGMs, which are named variable size AGMs. This is the mechanism to add and delete nodes according to necessity. In the simulations, comparisons between GNP program only, GNP with conventional AGMs and GNP with variable size AGMs are carried out using the tile world. Simulation results show that the proposed method is better compared with conventional GNP and GNP with conventional AGMs, And also it is clarified that the node transition rules obtained by new AGMs show the generalized rules able to deal with unknown environments.