Have students write a genetic algorithm in Java to solve instances of the Traveling Salesman Problem so that they can practice object-oriented programming and responsibility-driven design.

  • Give students starter code for this assignment because there are many required classes in this project.
    • This also gives students practice reading existing code and determining how to add to it to accomplish their goal.
    • Additionally, this is a good opportunity to introduce students to unit testing, as the solution requires many inter-dependent classes.
  • For the full assignment, visit Stanford’s nifty assignment page.
  • Note from the CS Teaching Tips Team: visit the Wikipedia entries for genetic algorithms and Traveling Salesman Problems for more information.