Personalized recommender systems have been extensively studied in human-centered intelligent systems. Existing recommendation techniques have achieved comparable performance in predictive accuracy; however, the trade-off between recommendation accuracy and diversity poses new challenges, as diversification may lead to accuracy loss, whereas it can solve the over-fitting problem and enhance the user experience. In this study, we propose a heuristic optimization-based recommendation model that jointly optimizes accuracy and diversity performance by obtaining a set of optimized solutions. To establish the best accuracy-diversity balance, a novel trajectory-reinforcement-based bacterial colony optimization algorithm was developed. The improved bacterial colony optimization algorithm was comprehensively evaluated by comparing it with eight popular and state-of-the-art algorithms on ten benchmark testing problems with different degrees of complexity. Furthermore, an optimization-based recommendation model was applied to a real-world recommendation dataset. The results demonstrate that the improved bacterial colony optimization algorithm achieves the best overall performance for benchmark problems in terms of convergence and diversity. In the real-world recommendation task, the proposed approach improved the diversity performance by 1.62% to 8.62% while maintaining superior (1.88% to 40.32%) accuracy performance. Additionally, the proposed personalized recommendation model can provide a set of nondominated solutions instead of a single solution to accommodate the ever-changing preferences of users and service providers. Therefore, this work demonstrates the excellence of an optimization-based recommendation approach for solving the accuracy-diversity trade-off.