This paper presents a path algorithm, using rule-based expert system concept, for real-time control of a robotic manipulator. The algorithm is able to generate three different paths to enable the manipulator to avoid an obstacle and then to select the shortest or the leastsegmented path to reach the end point. This algorithm requires very little computation time as compared to some of the other technique proposed. A graphical presentation of the result is also provided onscreen together with a 3-dimensional display to enhance the user's visualization of the results obtained. Simulation results showed that with the input data, the algorithm is able to generate the appropriate path and compute the necessary link angles to effect a movement of the links of the manipulator based on the generated path data.