- Set highest and lowest rolls to min and max available ability scores, discard highest and lowest rolls.
- Distribute the remaining rolls based on value.
- Allocate points to the remaining 4 abilities based on the distribution.
- Adjust scores to avoid wasted points.
Note that due to randomization occurring in specific scenarios some solutions are unstable.
As a general rule though, the vast majority of solution are stable.
Ability score-points cost based on 5e Point Buy Calculator default values.