Ask for a pattern
Set a price on each ordered length. The knapsack builds the single most valuable board there is at those prices — including patterns nobody has written down.
Try this. Push the 4-foot price up on its own. The pattern the knapsack builds flips to all-short-pieces long before that price looks large.
The knapsack does not pick from a list. It builds the winner from scratch, which is why its answer covers patterns that have never been written down.