Add general dynamic programming part with simple scoring