This thesis compares algorithms for a dynamic pickup and delivery problem, when new orders are arriving throughout the day. The dispatchers job is to assign incoming orders to a fleet of vehicles. Historical data is used to train the algorithms, where the objective is to select the same vehicle as the human dispatchers based on the information about the delivery and vehicles. The idea is to learn latent variables, which are common in the real world but difficult to incorporate in route optimization. The data set is compiled from deliveries from a courier company located in Stockholm, Sweden.The studied algorithms are: logistic regression, support vector machine, decision tree, feedforward neural network, and permutation invariant neural net...