The knowledge‐based prerequisite framework (KPF) is an alternative to the course‐based prerequisite framework (CPF), which is widely used for curriculum design. The KPF is more flexible because it only requires essential prerequisite knowledge, while the CPF is more rigid and requires students to take all prerequisite courses. Since the number of prerequisite knowledge terms is, in general, much greater than the number of prerequisite courses, flexibility can cause additional complexity. Furthermore, the KPF inevitably requires handling semantics of defined knowledge terms. This work presents a novel Artificial Intelligence (AI) Planning mathematical model that enables the KPF by automatically verifying prerequisite knowledge and incorporating hierarchical semantic relationships among knowledge terms into the model. The proposed model significantly improves the quality of course planning solutions by finding hidden or better solutions that could not be obtained without semantics consideration. The results of the comprehensive experiments show the optimality of the solutions obtained by the mathematical model and demonstrate the outperformance of incorporation of the semantics into the mathematical model, in terms of the quality of solutions. Finally, the experimental results on scalability show the necessity of the development of efficient heuristic algorithms.