This paper suggests the automated programming of CNC-machine tools with the help of artificial intelligence.Based on a CAD-model of the product, the system, without any help from an expert, automatically prepares a CNC program, so that the machining is safe, accurate and time-efficient.The developed CAD/CAM system uses NSGA-II multi-objective optimisation and swarm intelligence.The system consists of a prediction and evaluation module.In a prediction module artificial intelligence suggests solutions that include information about tool path, selected tools and suggested cutting parameters.The evaluation module estimates the suggested solutions by considering the geometrical, technological and time criteria, and the criterion of efficiency of machining.A simulation model was developed for searching optimal solutions.In this paper, the developed system is experimentally tested using a test case of manufacturing.The test results confirmed that with the help of this method of artificial intelligence, machine tools can be automatically programmed.