history-based edge weights