Fiscal rules are one of the tools aimed at preventing excessive public debt accumulation. Several government documents announce the forthcoming introduction of the permanent fiscal rule for Poland, whose aim is to ensure that the general government balance over medium term equals the medium term objective (-1% of GDP). In the following article we take an innovative approach to optimizing the parameters of the universal expenditure rule by a genetic algorithm.