Various human problems are tried to resolve with biomimetic design which imitate biological forms. A biomimetic Carangiform robotic fish provides great benefits with flexible maneuverability, high propulsion efficiency and less noisy considering classical rotary underwater vehicles. This paper presents a dynamic simulation model of the Carangiform robotic fish with flexible multi-joint propulsion mechanism considered as an artificial spine system for two swimming cases. In order to swim like a real fish, multi-joint propulsion mechanism assumed a series planar hinge joints which represent vertebras is adjusted by optimizing with a new searching method which provides precise values as direct search methods. The flapping frequency and the speed are proportional with the tail link lengths and angles of the joints. Thus, the optimization parameters are selected as end point coordinates of the joints and lengths of the each link to imitate the real travelling body wave. Two possible route planning scenarios for the robotic fish model inspired from the Carangiform motion are performed. These scenarios are summarized by two cases. Case 1 is the free swimming mode permits to go straight forward until it faces an obstacle. The fish decides to the turning direction by using decision-making process when it encounters an obstacle and finds the way to turn. In the Case 2, the fish proposes to reach the destination area along the shortest path. When faced with obstacles, it overcomes obstacles and tries to reach the target in the shortest way again.