Conventional directional well trajectory is designed to connect the wellhead and target point or section with multiple engineering objectives including deflecting capacity, torsional strength, total length, etc. With the growing need of directional wells for complex geological conditions, only the target point or section provided by geologists and reservoir engineers may not be satisfied as the geological objective for well trajectory design. The whole geological profile along the well trajectory can be taken as the geological objective instead of the target point or section. Furthermore, the state-of-the-art of the artificial intelligence algorithm can be applied automatically evaluate the geological profile and form a new geology objective for well trajectory design. In this study, an algorithm is proposed to evaluate the geological profile and a new index, formation evaluation score (FES), is obtained as the geological target for well trajectory design together with conventional multiple engineering objectives. With the combined multiple geological and engineering target, a directional well trajectory is optimized. The results show that the hydrocarbon formation contact effectively increases under comparable engineering conditions, which confirms the benefit of the proposed method in this work. In addition, the proposed method can globally optimize well trajectory with the help of the geological profile, as opposed to locally satisfy the target point or section. The automation of geological formation analysis can also reduce the workload for geologist and reservoir engineers. The outcome of this work may pave the way to comprehensive combine the geological and engineering objectives for directional well design under higher automation levels.