This repo is a small personal project written in python that is designed to help you win at the classic board game, Ticket to Ride.
- numpy
- networkx
After installing necessary dependencies, simply tweak the example in main.py to generate the shortest path that hits all the cities you wish to connect. This is the most common use-case. If you want, you can also explore color_graph.py to see some additional features and functions.
Due to time constraints, this project is not very adaptable. Example: let's saying you are playing Ticket to Ride and visit 5 cities. You put those five cities into the generatePaths function and, after a few moves, connect them all. Then, you pick up a new ticket and decide to add on a sixth city. If you simply add it to the list and rerun the code, it will give you the optimal path for connecting all six cities from the start. It will not take into the consideration the progress you've already made. This adaptability would be a fairly easy fix but I haven't added it.