Your idea sounds interesting and feasible. Your project may involve constraint logic programming. Only deal with easy constraints in Prolog because complicated ones may require an additional solver.