Liquid filling industry needs optimal liquid dispensing technique in their manufacturing process in order to increases the production as well to reduce the material cost. This can be achieved by a custom made pneumatic valve where it has the capabilities of producing big flow, small flow, PWM flow and spit flow in the dispensing process. This paper presents a modified artificial intelligent technique to optimize the selection of the flow rate to complete the liquid dispensing process with the most optimal dispensing speed and the accuracy of the dispensed weight. Clonal Selection based Artificial Immune System is used to determine the most optimal performance of the system. The developed algorithm is tested on the simulation program where it is used to control the dispensing valve to dispense the liquid with various viscosities. The experiment results are encouraged.