Fuzzy logical controller is one of the most important applications of fuzzy-rule-based system that models the human decision processing with a collection of fuzzy rules. In this paper, an adaptive ant colony algorithm is proposed based on dynamically adjusting the strategy of selection of the paths and the strategy of the trail information updating. The algorithm is used to design a fuzzy logical controller automatically for real-time control of an inverted pendulum. In order to avoid the combinatorial explosion of fuzzy rules due to multivariable inputs, state variable synthesis scheme is employed to reduce the number of fuzzy rules greatly. Experimental results show that the designed controller can control actual inverted pendulum successfully.