An innovative polygeneration system is proposed to generate power, heat, hydrogen, and oxygen simultaneously. The system integrates a solar central tower system and the heliostat field, a gas turbine cycle, a supercritical carbon dioxide cycle, an Organic Rankine Cycle with a cyclopentane working fluid, and a Rankine steam cycle, and a Proton Exchange Membrane electrolyzer. In this study, to reduce the gas cycle fuel consumption, the solar tower system is integrated with the gas cycle. In the studied system, a Supercritical Carbon Dioxide cycle and an Organic Rankine Cycle have been used to heat recovery of the exhaust gases of the gas turbine. In addition, Energy, Exergy, Exergoeconomic, Exergoenvironmental, Emergoeconomic, and Emergoenvironmental analyses have been performed for this system hour by hour. A computer code was developed in MATLAB for these analyses, and the results are validated by simulation in Thermoflex software and primary references with high accuracy. A systematic approach based on thermodynamic analysis and a combination of Genetic Programming and Artificial Neural Networks is proposed for optimal design. Multi-Objective Genetic Optimization has been employed to find optimum design parameters. Due to the reduction of computation time of optimization, the integration of Genetic Programming and Artificial Neural networks have been employed to generate correlations for objective functions based on the decision variables. By adding the solar system, the mass flow rate of natural gas consumption in the gas cycle decreases by about 9% and reaches 1.53 kg/s. Utilizing solar energy and the Rankine steam cycle, the production capacity of the considered cycle increases from 43 to 66 MW. Also, the performance analysis of the Proton Exchange Membrane electrolyzer and the primary cycle shows that this equipment can produce 0.01 g/s of hydrogen from 5 g/s of water entering the equipment per second by consuming 2.33 kW of power. The results show that when the decision variables are considered at the optimal performance point, the exergy efficiency, the total cost, the rate of destruction related to environmental impacts, cost based on emergy, and the rate of destruction environmental effects based on energy improve. The highest percentage of improvement among the objective functions compared to the initial